fix chatlog mouse behavior
This commit is contained in:
parent
417a0ec466
commit
d02d94a0b1
18
gameview.py
18
gameview.py
@ -252,7 +252,7 @@ class ChatLogs(QtGui.QTextEdit):
|
||||
def __init__(self, parent, logtype, logfile=None):
|
||||
QtGui.QTextEdit.__init__(self, parent)
|
||||
self.type = logtype
|
||||
self.setMouseTracking(True)
|
||||
#self.setMouseTracking(True)
|
||||
self.logfile = None
|
||||
self.anchor = None
|
||||
self.savelog = False
|
||||
@ -281,19 +281,19 @@ class ChatLogs(QtGui.QTextEdit):
|
||||
else:
|
||||
self.logfile = None
|
||||
|
||||
def mouseMoveEvent(self, e):
|
||||
super(ChatLogs, self).mouseMoveEvent(e)
|
||||
self.anchor = self.anchorAt(e.pos())
|
||||
# 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)
|
||||
|
||||
def mouseReleaseEvent(self, e):
|
||||
if self.anchor:
|
||||
QtGui.QDesktopServices.openUrl(QtCore.QUrl(self.anchor))
|
||||
# def mouseReleaseEvent(self, e):
|
||||
# if self.anchor:
|
||||
# QtGui.QDesktopServices.openUrl(QtCore.QUrl(self.anchor))
|
||||
# QtGui.QApplication.setOverrideCursor(QtCore.Qt.ArrowCursor)
|
||||
self.anchor = None
|
||||
# self.anchor = None
|
||||
|
||||
def __del__(self):
|
||||
if self.savelog:
|
||||
@ -3455,7 +3455,7 @@ class gui(QtGui.QWidget):
|
||||
self.paircheckbox.setText("This server does not support pairing.")
|
||||
|
||||
self.deskbtn.setDisabled("deskmod" not in features)
|
||||
self.flipbutton.setVisible("flipping" in features)
|
||||
self.flipbutton.setDisabled("flipping" not in features)
|
||||
self.customobject.setVisible("customobjections" in features)
|
||||
self.ypairoffset.setVisible("y_offset" in features)
|
||||
self.ypairoffset_l.setVisible("y_offset" in features)
|
||||
|
Loading…
Reference in New Issue
Block a user