summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets/qtabbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/qtabbar.cpp')
-rw-r--r--src/gui/widgets/qtabbar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index 16e4aad6d0..8faf156608 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -171,7 +171,7 @@ void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const
if (tabIndex > 0 && tabIndex - 1 == d->currentIndex)
option->selectedPosition = QStyleOptionTab::PreviousIsSelected;
- else if (tabIndex < totalTabs - 1 && tabIndex + 1 == d->currentIndex)
+ else if (tabIndex + 1 < totalTabs && tabIndex + 1 == d->currentIndex)
option->selectedPosition = QStyleOptionTab::NextIsSelected;
else
option->selectedPosition = QStyleOptionTab::NotAdjacent;