Browse Source

TTkTabs: fixed indexing when the new tab is plced over the current one

pull/44/head
Eugenio Parodi 4 years ago
parent
commit
8b6934ac10
  1. 2
      TermTk/TTkWidgets/tabwidget.py

2
TermTk/TTkWidgets/tabwidget.py

@ -273,6 +273,8 @@ class TTkTabBar(TTkWidget):
self.insertTab(len(self._tabButtons), label, data)
def insertTab(self, index, label, data=None):
if index <= self._currentIndex:
self._currentIndex += 1
button = TTkTabButton(parent=self, text=label, border=not self._small, closable=self._tabClosable)
button._borderColor = self._borderColor
self._tabButtons.insert(index,button)

Loading…
Cancel
Save