diff options
author | J-P Nurmi <jpnurmi@digia.com> | 2014-02-04 14:47:39 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-05 23:04:04 +0100 |
commit | 65bd80ebfc1be81a196a861ade40ff874a3554f0 (patch) | |
tree | 1585c1d738c6e5c1676d4967aa17ff5fb7153991 /src | |
parent | 2c1e77506ccd22f9d9be4f79875539a630f4f576 (diff) |
QTabWidget: fix moving of the current tab
Task-number: QTBUG-36455
Change-Id: I38687283d60fe38a4b586b064d5ddd4ed3be06b6
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Ivan Komissarov <ABBAPOH@me.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/widgets/widgets/qtabbar.cpp | 3 |
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(); } |