Turn off repainting while moving tabs.

Before we had some flashing because we're removing the tab, inserting the new
one, and then focusing the new one.
This commit is contained in:
Florian Bruhin 2014-08-25 15:41:19 +02:00
parent 2b85093d90
commit f452b02b24

View File

@ -644,9 +644,13 @@ class CommandDispatcher:
label = self._tabs.tabText(cur_idx)
cmdutils.check_overflow(cur_idx, 'int')
cmdutils.check_overflow(new_idx, 'int')
self._tabs.removeTab(cur_idx)
self._tabs.insertTab(new_idx, tab, icon, label)
self._tabs.setCurrentIndex(new_idx)
self._tabs.setUpdatesEnabled(False)
try:
self._tabs.removeTab(cur_idx)
self._tabs.insertTab(new_idx, tab, icon, label)
self._tabs.setCurrentIndex(new_idx)
finally:
self._tabs.setUpdatesEnabled(True)
@cmdutils.register(instance='mainwindow.tabs.cmd', split=False)
def spawn(self, *args):