Fix new tab position after closing tabs
This commit is contained in:
parent
a474b9b245
commit
ea5cd90e65
|
|
@ -697,6 +697,8 @@ class TabbedBrowser(QWidget):
|
||||||
log.webview.debug("on_current_changed got called with invalid "
|
log.webview.debug("on_current_changed got called with invalid "
|
||||||
"index {}".format(idx))
|
"index {}".format(idx))
|
||||||
return
|
return
|
||||||
|
self._tab_insert_idx_left = self.widget.currentIndex()
|
||||||
|
self._tab_insert_idx_right = self.widget.currentIndex() + 1
|
||||||
if self._now_focused is tab:
|
if self._now_focused is tab:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -724,8 +726,6 @@ class TabbedBrowser(QWidget):
|
||||||
self._now_focused = tab
|
self._now_focused = tab
|
||||||
self.current_tab_changed.emit(tab)
|
self.current_tab_changed.emit(tab)
|
||||||
QTimer.singleShot(0, self._update_window_title)
|
QTimer.singleShot(0, self._update_window_title)
|
||||||
self._tab_insert_idx_left = self.widget.currentIndex()
|
|
||||||
self._tab_insert_idx_right = self.widget.currentIndex() + 1
|
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def on_cmd_return_pressed(self):
|
def on_cmd_return_pressed(self):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue