GUI: Fix infinite loop with mouse wheel over tab
Reported as regression in #13106 Comment link: https://bugs.scummvm.org/ticket/13106#comment:4
This commit is contained in:
parent
125edd6724
commit
dc69bd4d67
2 changed files with 9 additions and 0 deletions
|
@ -318,6 +318,14 @@ bool TabWidget::handleKeyDown(Common::KeyState state) {
|
|||
return Widget::handleKeyDown(state);
|
||||
}
|
||||
|
||||
void TabWidget::handleMouseWheel(int x, int y, int direction) {
|
||||
if (direction == 1) {
|
||||
adjustTabs(kTabForwards);
|
||||
} else {
|
||||
adjustTabs(kTabBackwards);
|
||||
}
|
||||
}
|
||||
|
||||
void TabWidget::adjustTabs(int value) {
|
||||
// Determine which tab is next
|
||||
int tabID = _activeTab + value;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue