get_num_response don't show range if there is none

This commit is contained in:
2025-08-26 14:04:45 -05:00
parent 179ac5d931
commit 6f2fd7ea61

View File

@@ -351,7 +351,10 @@ short get_num_response(short min, short max, std::string prompt, std::vector<std
dynamic_cast<cLed&>(numPanel["extra-led"]).setState(*led_output ? led_red : led_off);
}
sout << " (" << min << '-' << max << ')';
// No min/max are applied if they are equal
if(min != max)
sout << " (" << min << '-' << max << ')';
numPanel["prompt"].setText(sout.str());
numPanel["number"].setTextToNum(initial_value);
if(!choice_names.empty()){