Allow negative values for counters

enumi, for example, can be negative.
This commit is contained in:
Scott Kostyshak 2022-07-09 16:40:22 -04:00
parent e481981dea
commit 21eb2c4f74

View File

@ -143,10 +143,8 @@ bool GuiCounter::checkWidgets(bool readonly) const
counterCB->setEnabled(!readonly);
actionCB->setEnabled(!readonly);
valueSB->setEnabled(!readonly && (cmdIsSet || cmdIsAddTo));
if (cmdIsAddTo)
valueSB->setRange(-10000, 10000);
else
valueSB->setRange(0, 10000);
// enumi, for example, can be negative.
valueSB->setRange(-10000, 10000);
return InsetParamsWidget::checkWidgets() && !readonly &&
!counterCB->currentText().isEmpty() &&