Allow expand selection to work (even if you probably can't get there).
I think the guessSelectionCandidates narrows down to a single item in 99.9% of cases, so we can probably remove this entirely. But for now it's safer just to fix it.
This commit is contained in:
parent
1786ae8773
commit
2fd5f25c3c
|
@ -1591,17 +1591,23 @@ bool EE_SELECTION_TOOL::doSelectionMenu( EE_COLLECTOR* aCollector )
|
||||||
selectAll = true;
|
selectAll = true;
|
||||||
current = nullptr;
|
current = nullptr;
|
||||||
}
|
}
|
||||||
|
else if( id == limit + 2 )
|
||||||
|
{
|
||||||
|
selectAll = false;
|
||||||
|
current = nullptr;
|
||||||
|
expandSelection = true;
|
||||||
|
}
|
||||||
// User has selected an item, so this one will be returned
|
// User has selected an item, so this one will be returned
|
||||||
else if( id && ( *id > 0 ) && ( *id <= limit ) )
|
else if( id && ( *id > 0 ) && ( *id <= limit ) )
|
||||||
{
|
{
|
||||||
selectAll = false;
|
selectAll = false;
|
||||||
current = ( *aCollector )[*id - 1];
|
current = ( *aCollector )[*id - 1];
|
||||||
}
|
}
|
||||||
|
// User has cancelled the menu (either by <esc> or clicking out of it)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
selectAll = false;
|
selectAll = false;
|
||||||
current = nullptr;
|
current = nullptr;
|
||||||
expandSelection = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( evt->Action() == TA_CHOICE_MENU_CLOSED )
|
else if( evt->Action() == TA_CHOICE_MENU_CLOSED )
|
||||||
|
|
Loading…
Reference in New Issue