Sketcher: Allow user to reset OVP state using backspace key
Currently if user tries to reset OVP, they can only do that by entering "0" for example, and then the parameters will get unset in unsetOnViewParameter. But that will only happen if user types a value that's under confusion point (typically 1e^-7). In my opinion, it would be cool to reset that state if user deletes all content in the label, to allow them to specify coordinates with mouse once again. Also, this patch fixes a regression with backspace, where deleting stuff from OVP was working on unix systems, but seems like on Windows it doesn't pass the check.
This commit is contained in:
@@ -571,6 +571,11 @@ void QuantitySpinBox::userInput(const QString & text)
|
||||
}
|
||||
else {
|
||||
d->validInput = false;
|
||||
|
||||
// we have to emit here signal explicitly as validator will not pass
|
||||
// this value further but we want to check it to disable isSet flag if
|
||||
// it has been set previously
|
||||
Q_EMIT valueChanged(d->quantity.getValue());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user