Skip to content

Commit

Permalink
Remove DoubleSpinBox validator range checks as since Qt 6.6 they are …
Browse files Browse the repository at this point in the history
…intrusive for our purposes
  • Loading branch information
timangus committed Oct 25, 2023
1 parent 6100245 commit f81f5f0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions source/app/ui/qml/app/graphia/Controls/DoubleSpinBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Control
function _update()
{
spinBox._setting = true;
root.value = Math.min(Math.max(root.value, root.from), root.to);
spinBox.value = spinBox.intValue(root.value);
spinBox._setting = false;
}
Expand Down Expand Up @@ -98,16 +99,12 @@ Control
property QtObject _doubleValidator: DoubleValidator
{
locale: spinBox.locale.name
bottom: Math.min(root.from, root.to)
top: Math.max(root.from, root.to)
notation: DoubleValidator.StandardNotation
}

property QtObject _intValidator: IntValidator
{
locale: spinBox.locale.name
bottom: Math.round(Math.min(root.from, root.to))
top: Math.round(Math.max(root.from, root.to))
}

validator: root.decimals > 0 ? _doubleValidator : _intValidator
Expand Down

0 comments on commit f81f5f0

Please sign in to comment.