Bug fix: Highlight correct tab after moving tabs around
This commit is contained in:
parent
35d0273d68
commit
602e4c741f
1 changed files with 13 additions and 0 deletions
13
convo.py
13
convo.py
|
@ -25,6 +25,8 @@ class PesterTabWindow(QtGui.QFrame):
|
||||||
self, QtCore.SLOT('changeTab(int)'))
|
self, QtCore.SLOT('changeTab(int)'))
|
||||||
self.connect(self.tabs, QtCore.SIGNAL('tabCloseRequested(int)'),
|
self.connect(self.tabs, QtCore.SIGNAL('tabCloseRequested(int)'),
|
||||||
self, QtCore.SLOT('tabClose(int)'))
|
self, QtCore.SLOT('tabClose(int)'))
|
||||||
|
self.connect(self.tabs, QtCore.SIGNAL('tabMoved(int, int)'),
|
||||||
|
self, QtCore.SLOT('tabMoved(int, int)'))
|
||||||
|
|
||||||
self.initTheme(self.mainwindow.theme)
|
self.initTheme(self.mainwindow.theme)
|
||||||
self.layout = QtGui.QVBoxLayout()
|
self.layout = QtGui.QVBoxLayout()
|
||||||
|
@ -195,6 +197,17 @@ class PesterTabWindow(QtGui.QFrame):
|
||||||
self.raise_()
|
self.raise_()
|
||||||
convo.raiseChat()
|
convo.raiseChat()
|
||||||
|
|
||||||
|
@QtCore.pyqtSlot(int, int)
|
||||||
|
def tabMoved(self, to, fr):
|
||||||
|
l = self.tabIndices
|
||||||
|
for i in l:
|
||||||
|
if l[i] == fr:
|
||||||
|
oldpos = i
|
||||||
|
if l[i] == to:
|
||||||
|
newpos = i
|
||||||
|
l[oldpos] = to
|
||||||
|
l[newpos] = fr
|
||||||
|
|
||||||
windowClosed = QtCore.pyqtSignal()
|
windowClosed = QtCore.pyqtSignal()
|
||||||
|
|
||||||
class PesterText(QtGui.QTextEdit):
|
class PesterText(QtGui.QTextEdit):
|
||||||
|
|
Loading…
Reference in a new issue