Skip to content

Commit

Permalink
Workaround a glitch when dragging a tileset tab around
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bjorn committed Jun 17, 2010
1 parent b08adf8 commit 0eddc0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tilesetdock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

Expand Down

0 comments on commit 0eddc0e

Please sign in to comment.