Skip to content

Commit

Permalink
Finally the maps attribution label
Browse files Browse the repository at this point in the history
  • Loading branch information
SanPen committed Sep 19, 2024
1 parent b5b4b5d commit 6be53a1
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 185 deletions.
23 changes: 11 additions & 12 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def mousePressEvent(self, event: QtWidgets.QGraphicsSceneMouseEvent) -> None:
if len(selected_items) < 2:
self.setSelected(True)
if self.enabled:
self.editor.map.view.disableMove = True
self.editor.map.view.disable_move = True
if event.button() == Qt.RightButton:
pass

Expand All @@ -197,7 +197,7 @@ def hoverEnterEvent(self, event: QtWidgets.QGraphicsSceneHoverEvent) -> None:
"""
Event handler for when the mouse enters the item.
"""
self.editor.map.view.inItem = True
# self.editor.map.view.in_item = True
self.hovered = True
self.setNodeColor(QColor(Qt.red), QColor(Qt.red))
QApplication.instance().setOverrideCursor(Qt.PointingHandCursor)
Expand All @@ -206,7 +206,7 @@ def hoverLeaveEvent(self, event: QtWidgets.QGraphicsSceneHoverEvent) -> None:
"""
Event handler for when the mouse leaves the item.
"""
self.editor.map.view.inItem = False
# self.editor.map.view.in_item = False
self.hovered = False
self.setDefaultColor()
QApplication.instance().restoreOverrideCursor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def mousePressEvent(self, event: QGraphicsSceneMouseEvent):
self.setSelected(True)

event.setAccepted(True)
self.editor.map.view.disableMove = True
self.editor.map.view.disable_move = True

if self.api_object is not None:
self.editor.set_editor_model(api_object=self.api_object)
Expand All @@ -208,7 +208,7 @@ def hoverEnterEvent(self, event: QtWidgets.QGraphicsSceneHoverEvent) -> None:
"""
Event handler for when the mouse enters the item.
"""
self.editor.map.view.inItem = True
# self.editor.map.view.in_item = True
self.setNodeColor(QColor(Qt.red), QColor(Qt.red))
self.hovered = True
QApplication.instance().setOverrideCursor(Qt.PointingHandCursor)
Expand All @@ -217,7 +217,7 @@ def hoverLeaveEvent(self, event: QtWidgets.QGraphicsSceneHoverEvent) -> None:
"""
Event handler for when the mouse leaves the item.
"""
self.editor.map.view.inItem = False
# self.editor.map.view.in_item = False
self.hovered = False
self.setDefaultColor()
QApplication.instance().restoreOverrideCursor()
Expand Down
Loading

0 comments on commit 6be53a1

Please sign in to comment.