revert clickable links on chatlogs, there's a weird bug
This commit is contained in:
parent
92085020b8
commit
dda37268d4
16
gameview.py
16
gameview.py
@ -199,15 +199,15 @@ class ChatLogs(QtGui.QTextEdit):
|
||||
def mouseMoveEvent(self, e):
|
||||
super(ChatLogs, self).mouseMoveEvent(e)
|
||||
self.anchor = self.anchorAt(e.pos())
|
||||
if self.anchor:
|
||||
QtGui.QApplication.setOverrideCursor(QtCore.Qt.PointingHandCursor)
|
||||
else:
|
||||
QtGui.QApplication.setOverrideCursor(QtCore.Qt.ArrowCursor)
|
||||
# if self.anchor:
|
||||
# QtGui.QApplication.setOverrideCursor(QtCore.Qt.PointingHandCursor)
|
||||
# else:
|
||||
# QtGui.QApplication.setOverrideCursor(QtCore.Qt.ArrowCursor)
|
||||
|
||||
def mouseReleaseEvent(self, e):
|
||||
if self.anchor:
|
||||
QtGui.QDesktopServices.openUrl(QtCore.QUrl(self.anchor))
|
||||
QtGui.QApplication.setOverrideCursor(QtCore.Qt.ArrowCursor)
|
||||
# QtGui.QApplication.setOverrideCursor(QtCore.Qt.ArrowCursor)
|
||||
self.anchor = None
|
||||
|
||||
def __del__(self):
|
||||
@ -233,9 +233,9 @@ class ChatLogs(QtGui.QTextEdit):
|
||||
else:
|
||||
self.logfile.write(text.toUtf8()+"\n")
|
||||
|
||||
if "http" in text:
|
||||
text = unicode(text) # Get rid of QStrings
|
||||
text = re.sub(URL_REGEX, r'<a href="\g<0>">\g<0></a>', text)
|
||||
# if "http" in text:
|
||||
# text = unicode(text) # Get rid of QStrings
|
||||
# text = re.sub(URL_REGEX, r'<a href="\g<0>">\g<0></a>', text)
|
||||
|
||||
super(ChatLogs, self).append(text)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user