Gui: [skip ci] fixes #0004104: Void property value defaults to 1

This commit is contained in:
wmayer
2021-02-23 17:32:02 +01:00
parent 646103113e
commit 30ccf14117

View File

@@ -89,6 +89,11 @@ public:
bool validate(QString& input, Base::Quantity& result) const
{
// Do not accept empty strings because the parser will consider
// " unit" as "1 unit" which is not the desired behaviour (see #0004104)
if (input.isEmpty())
return false;
bool success = false;
QString tmp = input;
int pos = 0;