fix theme not loading when leaving charselect while iniswapped
This commit is contained in:
parent
ea24e3dbd2
commit
06cc2e4c27
13
gameview.py
13
gameview.py
@ -1235,13 +1235,16 @@ class gui(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
self.tcp.send("RT#judgeruling#" +str(variant)+ "#%")
|
self.tcp.send("RT#judgeruling#" +str(variant)+ "#%")
|
||||||
|
|
||||||
def loadCharacter(self, charname):
|
def onPVPacket(self, charname):
|
||||||
exec open(AO2XPpath+"ao2xp_themes/"+get_option("General", "theme", "default")+"/theme.py")
|
exec open(AO2XPpath+"ao2xp_themes/"+get_option("General", "theme", "default")+"/theme.py")
|
||||||
|
if not self.swapping:
|
||||||
|
self.loadCharacter(charname)
|
||||||
|
|
||||||
self.effectdropdown.clear()
|
def loadCharacter(self, charname):
|
||||||
self.emotedropdown.clear()
|
|
||||||
self.msgqueueList.clear()
|
self.msgqueueList.clear()
|
||||||
self.msgqueue = []
|
self.msgqueue = []
|
||||||
|
self.effectdropdown.clear()
|
||||||
|
self.emotedropdown.clear()
|
||||||
self.charemotes = []
|
self.charemotes = []
|
||||||
self.selectedemote = 0
|
self.selectedemote = 0
|
||||||
self.current_emote_page = 0
|
self.current_emote_page = 0
|
||||||
@ -2434,7 +2437,7 @@ class gui(QtGui.QWidget):
|
|||||||
#thread.start_new_thread(self.tcp_thread, ())
|
#thread.start_new_thread(self.tcp_thread, ())
|
||||||
self.tcpthread = TCP_Thread(self)
|
self.tcpthread = TCP_Thread(self)
|
||||||
self.tcpthread.MS_Chat.connect(self.netmsg_ms)
|
self.tcpthread.MS_Chat.connect(self.netmsg_ms)
|
||||||
self.tcpthread.newChar.connect(self.loadCharacter)
|
self.tcpthread.newChar.connect(self.onPVPacket)
|
||||||
self.tcpthread.newBackground.connect(self.setBackground)
|
self.tcpthread.newBackground.connect(self.setBackground)
|
||||||
self.tcpthread.OOC_Log.connect(self.ooclog.append)
|
self.tcpthread.OOC_Log.connect(self.ooclog.append)
|
||||||
self.tcpthread.IC_Log.connect(self.icLog.append)
|
self.tcpthread.IC_Log.connect(self.icLog.append)
|
||||||
@ -2761,8 +2764,6 @@ class TCP_Thread(QtCore.QThread):
|
|||||||
elif header == 'PV':
|
elif header == 'PV':
|
||||||
self.parent.mychar = int(network[3])
|
self.parent.mychar = int(network[3])
|
||||||
self.parent.charselect.hide()
|
self.parent.charselect.hide()
|
||||||
if self.parent.swapping:
|
|
||||||
continue
|
|
||||||
self.newChar.emit(self.parent.charlist[self.parent.mychar][0])
|
self.newChar.emit(self.parent.charlist[self.parent.mychar][0])
|
||||||
|
|
||||||
elif header == 'LE':
|
elif header == 'LE':
|
||||||
|
Loading…
Reference in New Issue
Block a user