improve SIUnitEdit behavior on windows when the value is changed while the widget has the focus

This commit is contained in:
Jan Käberich 2024-02-17 19:45:43 +01:00
parent 2bbb8792d8
commit 82dc84be8a

View File

@ -146,6 +146,10 @@ void SIUnitEdit::setValueQuiet(double value)
{ {
_value = value; _value = value;
setPlaceholderText(Unit::ToString(value, unit, prefixes, precision)); setPlaceholderText(Unit::ToString(value, unit, prefixes, precision));
if(!text().isEmpty()) {
// currently editing, update the text as well
continueEditing();
}
} }
void SIUnitEdit::parseNewValue(double factor) void SIUnitEdit::parseNewValue(double factor)