WSL/SLF GitLab Repository

Commit c47dbec8 authored by Michael Reisecker's avatar Michael Reisecker
Browse files

Try to help issue #875

Now, when selecting a whole number we mark the value as unhidden (the
selection makes it show)
parent 4f6c13b9
......@@ -52,7 +52,10 @@ bool FocusEventFilter::eventFilter(QObject *object, QEvent *event)
if (auto *textfield = qobject_cast<QLineEdit *>(object))
QTimer::singleShot(delay_t, object, [=]{ textfield->selectAll(); });
else if (auto *spinbox = qobject_cast<QAbstractSpinBox *>(object))
QTimer::singleShot(delay_t, object, [=]{ spinbox->selectAll(); });
//This is from a Number panel -> in case it is hidden the selection will make
//the value show and we mark it as unread. This also prevents selecting all
//text again after input:
QTimer::singleShot(delay_t, object, [=]{ object->setProperty("empty", false); spinbox->selectAll(); });
else if (auto *dropdown = qobject_cast<QComboBox *>(object))
QTimer::singleShot(delay_t, object, [=]{ dropdown->lineEdit()->selectAll(); });
}
......
......@@ -85,7 +85,7 @@ Textfield::Textfield(const QString &section, const QString &key, const QDomNode
}
/**
* @brief Default constructor with minimal cleanup.
* @brief Default destructor with minimal cleanup.
*/
Textfield::~Textfield()
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment