summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/widgets/qtabbar.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp
index dfd1f1022c..b47d65f561 100644
--- a/src/widgets/widgets/qtabbar.cpp
+++ b/src/widgets/widgets/qtabbar.cpp
@@ -1681,6 +1681,7 @@ void QTabBar::moveTab(int from, int to)
d->tabList[i].lastTab = d->calculateNewPosition(from, to, d->tabList[i].lastTab);
// update external variables
+ int previousIndex = d->currentIndex;
d->currentIndex = d->calculateNewPosition(from, to, d->currentIndex);
// If we are in the middle of a drag update the dragStartPosition
@@ -1699,6 +1700,8 @@ void QTabBar::moveTab(int from, int to)
d->layoutWidgets(start);
update();
emit tabMoved(from, to);
+ if (previousIndex != d->currentIndex)
+ emit currentChanged(d->currentIndex);
emit tabLayoutChange();
}