Small fix for situations where we cannot find the tab for the index
Need to investigate better why and when this is excatly happening
This commit is contained in:
parent
d7a1a542b6
commit
29d1c0d68b
@ -446,11 +446,14 @@ class TabBar(QTabBar):
|
|||||||
size = minimum_size
|
size = minimum_size
|
||||||
else:
|
else:
|
||||||
#TODO: relative size and/or configured one
|
#TODO: relative size and/or configured one
|
||||||
tab = objreg.get('tab', scope='tab', window=self._win_id, tab=index)
|
try:
|
||||||
if tab.pin is True:
|
tab = objreg.get('tab', scope='tab', window=self._win_id, tab=index)
|
||||||
size = QSize(40, height)
|
if tab.pin is True:
|
||||||
qtutils.ensure_valid(size)
|
size = QSize(40, height)
|
||||||
return size
|
qtutils.ensure_valid(size)
|
||||||
|
return size
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
# If we *do* have enough space, tabs should occupy the whole window
|
# If we *do* have enough space, tabs should occupy the whole window
|
||||||
# width.
|
# width.
|
||||||
#looks like this generates high cpu usage
|
#looks like this generates high cpu usage
|
||||||
|
Loading…
Reference in New Issue
Block a user