Fix behavior when toggling stacking behavior in a single tab
This commit is contained in:
parent
0e7bbccd71
commit
454c532668
@ -1365,7 +1365,7 @@ tabs.new_position.stacking:
|
||||
default: true
|
||||
type: Bool
|
||||
desc: >-
|
||||
Stack relative tabs on top of each other when opened consecutively.
|
||||
Stack related tabs on top of each other when opened consecutively.
|
||||
|
||||
Only applies `next` and `prev` values of `tabs.new_position.related` and
|
||||
`tabs.new_position.unrelated`.
|
||||
|
@ -530,17 +530,17 @@ class TabbedBrowser(QWidget):
|
||||
idx = self._tab_insert_idx_left
|
||||
# On first sight, we'd think we have to decrement
|
||||
# self._tab_insert_idx_left here, as we want the next tab to be
|
||||
# *before* the one we just opened. However, since we opened a tab
|
||||
# *before* the currently focused tab, indices will shift by
|
||||
# *before* the one we just opened. However, since we opened a
|
||||
# tab *before* the currently focused tab, indices will shift by
|
||||
# 1 automatically.
|
||||
else:
|
||||
idx = self.widget.currentIndex()
|
||||
elif pos == 'next':
|
||||
if config.val.tabs.new_position.stacking:
|
||||
idx = self._tab_insert_idx_right
|
||||
self._tab_insert_idx_right += 1
|
||||
else:
|
||||
idx = self.widget.currentIndex() + 1
|
||||
self._tab_insert_idx_right += 1
|
||||
elif pos == 'first':
|
||||
idx = 0
|
||||
elif pos == 'last':
|
||||
|
Loading…
Reference in New Issue
Block a user