From 82dc84be8a0c72e7d5a8a7af62f1a3232542c725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Sat, 17 Feb 2024 19:45:43 +0100 Subject: [PATCH] improve SIUnitEdit behavior on windows when the value is changed while the widget has the focus --- .../PC_Application/LibreVNA-GUI/CustomWidgets/siunitedit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Software/PC_Application/LibreVNA-GUI/CustomWidgets/siunitedit.cpp b/Software/PC_Application/LibreVNA-GUI/CustomWidgets/siunitedit.cpp index beeb825..fef3e41 100644 --- a/Software/PC_Application/LibreVNA-GUI/CustomWidgets/siunitedit.cpp +++ b/Software/PC_Application/LibreVNA-GUI/CustomWidgets/siunitedit.cpp @@ -146,6 +146,10 @@ void SIUnitEdit::setValueQuiet(double value) { _value = value; setPlaceholderText(Unit::ToString(value, unit, prefixes, precision)); + if(!text().isEmpty()) { + // currently editing, update the text as well + continueEditing(); + } } void SIUnitEdit::parseNewValue(double factor)