]> git.lyx.org Git - features.git/commitdiff
0 is a plausible intermediate length in positive context (#12508)
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 17 Mar 2022 07:15:09 +0000 (08:15 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Thu, 17 Mar 2022 07:15:09 +0000 (08:15 +0100)
src/frontends/qt/Validator.cpp

index 0d3b672f1228d5d5c08ea5b43ac9ff6ef812487b..1ef90ac2c86f86156c4d3eb7a9cb714378601b03 100644 (file)
@@ -56,6 +56,10 @@ QValidator::State LengthValidator::validate(QString & qtext, int &) const
        if (ok && unsigned_ && d < 0)
                return QValidator::Invalid;
 
+       if (ok && positive_ && d == 0)
+               // A plausible intermediate value, see #12508
+               return QValidator::Intermediate;
+
        if (ok && positive_ && d <=0)
                return QValidator::Invalid;