mirror of https://github.com/stella-emu/stella.git
fix #507
This commit is contained in:
parent
3eed4fa3a9
commit
8e177cf627
|
@ -170,8 +170,12 @@ void RomListWidget::setHighlighted(int item)
|
||||||
_highlightedItem = item;
|
_highlightedItem = item;
|
||||||
|
|
||||||
// Only scroll the list if we're about to pass the page boundary
|
// Only scroll the list if we're about to pass the page boundary
|
||||||
if(_currentPos == 0)
|
if (_highlightedItem < _currentPos)
|
||||||
_currentPos = _highlightedItem;
|
{
|
||||||
|
_currentPos -= _rows;
|
||||||
|
if (_currentPos < 0)
|
||||||
|
_currentPos = 0;
|
||||||
|
}
|
||||||
else if(_highlightedItem == _currentPos + _rows)
|
else if(_highlightedItem == _currentPos + _rows)
|
||||||
_currentPos += _rows;
|
_currentPos += _rows;
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ class RomListWidget : public EditableWidget
|
||||||
int _bytesWidth;
|
int _bytesWidth;
|
||||||
int _rows;
|
int _rows;
|
||||||
int _cols;
|
int _cols;
|
||||||
int _currentPos;
|
int _currentPos; // position of first line in visible window
|
||||||
int _selectedItem;
|
int _selectedItem;
|
||||||
int _highlightedItem;
|
int _highlightedItem;
|
||||||
bool _editMode;
|
bool _editMode;
|
||||||
|
|
Loading…
Reference in New Issue