Fixed TabbedBrowserStub's tabBar, no longer toggling updates while moving tabs
This commit is contained in:
parent
e613d01263
commit
2fca442892
@ -1031,14 +1031,10 @@ class CommandDispatcher:
|
|||||||
cur_idx = self._current_index()
|
cur_idx = self._current_index()
|
||||||
cmdutils.check_overflow(cur_idx, 'int')
|
cmdutils.check_overflow(cur_idx, 'int')
|
||||||
cmdutils.check_overflow(new_idx, 'int')
|
cmdutils.check_overflow(new_idx, 'int')
|
||||||
self._tabbed_browser.setUpdatesEnabled(False)
|
color = self._tabbed_browser.tab_indicator_color(cur_idx)
|
||||||
try:
|
self._tabbed_browser.tabBar().moveTab(cur_idx, new_idx)
|
||||||
color = self._tabbed_browser.tab_indicator_color(cur_idx)
|
self._set_current_index(new_idx)
|
||||||
self._tabbed_browser.tabBar().moveTab(cur_idx, new_idx)
|
self._tabbed_browser.set_tab_indicator_color(new_idx, color)
|
||||||
self._set_current_index(new_idx)
|
|
||||||
self._tabbed_browser.set_tab_indicator_color(new_idx, color)
|
|
||||||
finally:
|
|
||||||
self._tabbed_browser.setUpdatesEnabled(True)
|
|
||||||
|
|
||||||
@cmdutils.register(instance='command-dispatcher', scope='window',
|
@cmdutils.register(instance='command-dispatcher', scope='window',
|
||||||
maxsplit=0, no_replace_variables=True)
|
maxsplit=0, no_replace_variables=True)
|
||||||
|
@ -586,7 +586,7 @@ class TabbedBrowserStub(QObject):
|
|||||||
del self.tabs[idx]
|
del self.tabs[idx]
|
||||||
|
|
||||||
def tabBar(self):
|
def tabBar(self):
|
||||||
return QTabBar(self._qtabbar)
|
return self._qtabbar
|
||||||
|
|
||||||
|
|
||||||
class ApplicationStub(QObject):
|
class ApplicationStub(QObject):
|
||||||
|
Loading…
Reference in New Issue
Block a user