diff options
author | Simon Rettberg | 2019-07-04 15:02:03 +0200 |
---|---|---|
committer | Simon Rettberg | 2019-07-04 15:02:03 +0200 |
commit | 063002da08916b80fe459a8ae8cbd9a543538ef1 (patch) | |
tree | c17172e025e8ba7813beecd5f6ae5180411c720d | |
parent | Address timing issues with WM spawning (diff) | |
download | vmchooser2-063002da08916b80fe459a8ae8cbd9a543538ef1.tar.gz vmchooser2-063002da08916b80fe459a8ae8cbd9a543538ef1.tar.xz vmchooser2-063002da08916b80fe459a8ae8cbd9a543538ef1.zip |
Fix infinite loop if all three lists are empty
-rw-r--r-- | src/dialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp index 932f28c..56860f2 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -842,7 +842,7 @@ void Dialog::on_leftKey() { int i = activeTab_; do { i = (i - 1 + TAB_COUNT) % TAB_COUNT; - } while (!tabs_[i]->isEnabled()); + } while (!tabs_[i]->isEnabled() && i != activeTab_); onTabButtonChanged(i); } @@ -850,7 +850,7 @@ void Dialog::on_rightKey() { int i = activeTab_; do { i = (i + 1) % TAB_COUNT; - } while (!tabs_[i]->isEnabled()); + } while (!tabs_[i]->isEnabled() && i != activeTab_); onTabButtonChanged(i); } |