Fixed TabbedBrowserStub's tabBar, no longer toggling updates while moving tabs

This commit is contained in:
Maciej Wołczyk 2016-11-30 15:23:35 +01:00
parent e613d01263
commit 2fca442892
2 changed files with 5 additions and 9 deletions

View File

@ -1031,14 +1031,10 @@ class CommandDispatcher:
cur_idx = self._current_index()
cmdutils.check_overflow(cur_idx, 'int')
cmdutils.check_overflow(new_idx, 'int')
self._tabbed_browser.setUpdatesEnabled(False)
try:
color = self._tabbed_browser.tab_indicator_color(cur_idx)
self._tabbed_browser.tabBar().moveTab(cur_idx, new_idx)
self._set_current_index(new_idx)
self._tabbed_browser.set_tab_indicator_color(new_idx, color)
finally:
self._tabbed_browser.setUpdatesEnabled(True)
color = self._tabbed_browser.tab_indicator_color(cur_idx)
self._tabbed_browser.tabBar().moveTab(cur_idx, new_idx)
self._set_current_index(new_idx)
self._tabbed_browser.set_tab_indicator_color(new_idx, color)
@cmdutils.register(instance='command-dispatcher', scope='window',
maxsplit=0, no_replace_variables=True)

View File

@ -586,7 +586,7 @@ class TabbedBrowserStub(QObject):
del self.tabs[idx]
def tabBar(self):
return QTabBar(self._qtabbar)
return self._qtabbar
class ApplicationStub(QObject):