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
|
default: true
|
||||||
type: Bool
|
type: Bool
|
||||||
desc: >-
|
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
|
Only applies `next` and `prev` values of `tabs.new_position.related` and
|
||||||
`tabs.new_position.unrelated`.
|
`tabs.new_position.unrelated`.
|
||||||
|
@ -530,17 +530,17 @@ class TabbedBrowser(QWidget):
|
|||||||
idx = self._tab_insert_idx_left
|
idx = self._tab_insert_idx_left
|
||||||
# On first sight, we'd think we have to decrement
|
# On first sight, we'd think we have to decrement
|
||||||
# self._tab_insert_idx_left here, as we want the next tab to be
|
# 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 one we just opened. However, since we opened a
|
||||||
# *before* the currently focused tab, indices will shift by
|
# tab *before* the currently focused tab, indices will shift by
|
||||||
# 1 automatically.
|
# 1 automatically.
|
||||||
else:
|
else:
|
||||||
idx = self.widget.currentIndex()
|
idx = self.widget.currentIndex()
|
||||||
elif pos == 'next':
|
elif pos == 'next':
|
||||||
if config.val.tabs.new_position.stacking:
|
if config.val.tabs.new_position.stacking:
|
||||||
idx = self._tab_insert_idx_right
|
idx = self._tab_insert_idx_right
|
||||||
self._tab_insert_idx_right += 1
|
|
||||||
else:
|
else:
|
||||||
idx = self.widget.currentIndex() + 1
|
idx = self.widget.currentIndex() + 1
|
||||||
|
self._tab_insert_idx_right += 1
|
||||||
elif pos == 'first':
|
elif pos == 'first':
|
||||||
idx = 0
|
idx = 0
|
||||||
elif pos == 'last':
|
elif pos == 'last':
|
||||||
|
Loading…
Reference in New Issue
Block a user