From 0eddc0ede92c27a7f0fd7645b0e140cc13c20155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Thu, 17 Jun 2010 21:38:20 +0200 Subject: [PATCH] Workaround a glitch when dragging a tileset tab around QTabBar::setTabText does not check whether the tab text remains the same, and will always relayout the tabs. This caused a glitch while dragging a tab when the tabs don't fit horizontally. The fact is that while dragging a tab, the tab texts will already be up to date, so there is no need to update them. --- src/tilesetdock.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tilesetdock.cpp b/src/tilesetdock.cpp index aa45733d9b..0044afd4a3 100644 --- a/src/tilesetdock.cpp +++ b/src/tilesetdock.cpp @@ -216,7 +216,8 @@ void TilesetDock::tilesetMoved(int from, int to) const int end = qMax(from, to); for (int i = start; i <= end; ++i) { const Tileset *tileset = tilesetViewAt(i)->tilesetModel()->tileset(); - mTabBar->setTabText(i, tileset->name()); + if (mTabBar->tabText(i) != tileset->name()) + mTabBar->setTabText(i, tileset->name()); } }