summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrenda-br2023-02-08 16:27:35 +0530
committerbrenda-br2023-02-08 16:27:35 +0530
commit99c27ad53f5dd7327b9e9b2f4d2e48d1238122bf (patch)
treed7f1ea23747b1adb75573034bbd5a79cdc72eb03
parentbad6aa3bbb7423015cf3a2e44c9502ff78eb0ae8 (diff)
downloadChemical-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.py8
-rw-r--r--Undo.datbin16379 -> 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:
diff --git a/Undo.dat b/Undo.dat
index 9d4d6c1..67006f6 100644
--- a/Undo.dat
+++ b/Undo.dat
Binary files differ