Gui: [skip ci] fixes #0004104: Void property value defaults to 1
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user