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