mirror of https://github.com/stella-emu/stella.git
fixed selection issue when switching input event filters
This commit is contained in:
parent
30b6b5b06c
commit
82672f544f
|
@ -172,7 +172,7 @@ void ListWidget::recalc()
|
||||||
{
|
{
|
||||||
int size = int(_list.size());
|
int size = int(_list.size());
|
||||||
|
|
||||||
if(_currentPos >= size)
|
if(_currentPos >= size - _rows)
|
||||||
{
|
{
|
||||||
if(size <= _rows)
|
if(size <= _rows)
|
||||||
_currentPos = 0;
|
_currentPos = 0;
|
||||||
|
@ -182,7 +182,9 @@ void ListWidget::recalc()
|
||||||
if (_currentPos < 0)
|
if (_currentPos < 0)
|
||||||
_currentPos = 0;
|
_currentPos = 0;
|
||||||
|
|
||||||
if(_selectedItem < 0 || _selectedItem >= size)
|
if(_selectedItem >= size)
|
||||||
|
_selectedItem = size - 1;
|
||||||
|
if(_selectedItem < 0)
|
||||||
_selectedItem = 0;
|
_selectedItem = 0;
|
||||||
|
|
||||||
_editMode = false;
|
_editMode = false;
|
||||||
|
|
Loading…
Reference in New Issue