From 21eb2c4f74c5665e6516cf900acf4f5acba21c69 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Sat, 9 Jul 2022 16:40:22 -0400 Subject: [PATCH] Allow negative values for counters enumi, for example, can be negative. --- src/frontends/qt/GuiCounter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/frontends/qt/GuiCounter.cpp b/src/frontends/qt/GuiCounter.cpp index 1c79725a87..04fab3a664 100644 --- a/src/frontends/qt/GuiCounter.cpp +++ b/src/frontends/qt/GuiCounter.cpp @@ -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() && -- 2.39.5