Choice without text values should be OK now

This commit is contained in:
Bertrand Songis
2020-04-21 09:22:37 +02:00
parent 03ac973d7b
commit 8b4cf2baa2
+6 -1
View File
@@ -128,11 +128,16 @@ void Choice::openMenu()
setValue(i);
});
}
else {
else if (unsigned(i - vmin) < values.size()) {
menu->addLine(values[i - vmin], [=]() {
setValue(i);
});
}
else {
menu->addLine(std::to_string(i), [=]() {
setValue(i);
});
}
if (value == i) {
current = count;
}