diff options
author | brenda-br | 2023-02-08 16:27:35 +0530 |
---|---|---|
committer | brenda-br | 2023-02-08 16:27:35 +0530 |
commit | 99c27ad53f5dd7327b9e9b2f4d2e48d1238122bf (patch) | |
tree | d7f1ea23747b1adb75573034bbd5a79cdc72eb03 | |
parent | bad6aa3bbb7423015cf3a2e44c9502ff78eb0ae8 (diff) | |
download | Chemical-Simulator-GUI-99c27ad53f5dd7327b9e9b2f4d2e48d1238122bf.tar.gz Chemical-Simulator-GUI-99c27ad53f5dd7327b9e9b2f4d2e48d1238122bf.tar.bz2 Chemical-Simulator-GUI-99c27ad53f5dd7327b9e9b2f4d2e48d1238122bf.zip |
Fix #53 Pointing Hand Cursor only on Node Socket
-rw-r--r-- | Graphics.py | 8 | ||||
-rw-r--r-- | Undo.dat | bin | 16379 -> 18267 bytes |
2 files changed, 7 insertions, 1 deletions
diff --git a/Graphics.py b/Graphics.py index 862845b..aa032ec 100644 --- a/Graphics.py +++ b/Graphics.py @@ -288,7 +288,7 @@ class NodeSocket(QtWidgets.QGraphicsItem): painter.drawEllipse(self.rect.x()+2,self.rect.y()+2,(self.rect.height()/3)*2,(self.rect.width()/3)*2) def mousePressEvent(self, event): - cursor = QCursor( Qt.PointingHandCursor ) + cursor = QCursor( Qt.ArrowCursor ) QApplication.instance().setOverrideCursor(cursor) if self.type == 'op': @@ -313,6 +313,12 @@ class NodeSocket(QtWidgets.QGraphicsItem): def mouseMoveEvent(self, event): if self.type == 'op': + item = self.scene().itemAt(event.scenePos().toPoint(),QtGui.QTransform()) + if(isinstance(item,NodeSocket)): + QApplication.instance().setOverrideCursor(QCursor( Qt.PointingHandCursor)) + else: + QApplication.instance().restoreOverrideCursor() + QApplication.instance().setOverrideCursor(QCursor( Qt.ArrowCursor)) pointB = self.mapToScene(event.pos()) self.new_line.pointB = pointB if self.other_line: Binary files differ |