Choice issue when the first item is not available
This commit is contained in:
+3
-3
@@ -102,14 +102,14 @@ class Choice : public ChoiceBase {
|
|||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getValueFromIndex(unsigned index)
|
int getValueFromIndex(int index)
|
||||||
{
|
{
|
||||||
if (!isValueAvailable) {
|
if (!isValueAvailable) {
|
||||||
return vmin + index;
|
return vmin + index;
|
||||||
}
|
}
|
||||||
|
|
||||||
int value = vmin;
|
int value = vmin - 1;
|
||||||
while (index > 0) {
|
while (index >= 0) {
|
||||||
index--;
|
index--;
|
||||||
value++;
|
value++;
|
||||||
while (value < vmax && !isValueAvailable(value)) {
|
while (value < vmax && !isValueAvailable(value)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user