Skip to content

Commit 75eb1cf

Browse files
committed
Tabs cleanup.
1 parent ace8b06 commit 75eb1cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/vanilla/vanillaTabs.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ class VanillaTabItem(VanillaBaseObject):
4141
nsViewControllerClass = NSViewController
4242

4343
def __init__(self, title):
44-
self._haveSetFrame = False
4544
self._autoLayoutViews = {}
4645
self._tabItem = getNSSubclass(self.nsTabViewItemClass).alloc().initWithIdentifier_(title)
4746
self._tabItem.setVanillaWrapper_(self)
@@ -59,6 +58,7 @@ def _getContentView(self):
5958
return self._tabItem.view()
6059

6160
def _breakCycles(self):
61+
self._nsObject = None
6262
_breakCycles(self._tabItem.view())
6363
self._autoLayoutViews.clear()
6464

@@ -174,6 +174,9 @@ def getNSTabView(self):
174174

175175
def _positionViews(self):
176176
contentRect = self.getNSTabView().contentRect()
177+
# only do after the first because
178+
# adjusting the first gives it
179+
# incorrect positioning
177180
for item in self._tabItems[1:]:
178181
item._setFrame(contentRect)
179182

0 commit comments

Comments
 (0)