Skip to content

Commit 7bab1f8

Browse files
authored
Merge pull request #340 from jchanvfx/spelling_typo_fix
spelling typo fix
2 parents 693a521 + 39ea026 commit 7bab1f8

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

NodeGraphQt/widgets/viewer.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ def __init__(self, parent=None, undo_stack=None):
100100
ViewerEnum.BACKGROUND_COLOR.value
101101
)))
102102
text_color.setAlpha(50)
103-
self._cusor_text = QtWidgets.QGraphicsTextItem()
104-
self._cusor_text.setFlag(self._cusor_text.ItemIsSelectable, False)
105-
self._cusor_text.setDefaultTextColor(text_color)
106-
self._cusor_text.setZValue(Z_VAL_PIPE - 1)
107-
font = self._cusor_text.font()
103+
self._cursor_text = QtWidgets.QGraphicsTextItem()
104+
self._cursor_text.setFlag(self._cursor_text.ItemIsSelectable, False)
105+
self._cursor_text.setDefaultTextColor(text_color)
106+
self._cursor_text.setZValue(Z_VAL_PIPE - 1)
107+
font = self._cursor_text.font()
108108
font.setPointSize(7)
109-
self._cusor_text.setFont(font)
110-
self.scene().addItem(self._cusor_text)
109+
self._cursor_text.setFont(font)
110+
self.scene().addItem(self._cursor_text)
111111

112112
self._LIVE_PIPE = LivePipeItem()
113113
self._LIVE_PIPE.setVisible(False)
@@ -488,8 +488,8 @@ def mousePressEvent(self, event):
488488
pipes[0].reset()
489489
port = pipes[0].port_from_pos(map_pos, reverse=True)
490490
if not port.locked and port.multi_connection:
491-
self._cusor_text.setPlainText('')
492-
self._cusor_text.setVisible(False)
491+
self._cursor_text.setPlainText('')
492+
self._cursor_text.setVisible(False)
493493
self.start_live_connection(port)
494494

495495
# return here as the default behaviour unselects nodes with
@@ -593,7 +593,7 @@ def mouseMoveEvent(self, event):
593593
if not self.ALT_state:
594594
if self.SHIFT_state or self.CTRL_state:
595595
if not self._LIVE_PIPE.isVisible():
596-
self._cusor_text.setPos(self.mapToScene(event.pos()))
596+
self._cursor_text.setPos(self.mapToScene(event.pos()))
597597

598598
if self.LMB_state and self._rubber_band.isActive:
599599
rect = QtCore.QRect(self._origin_pos, event.pos()).normalized()
@@ -705,7 +705,7 @@ def keyPressEvent(self, event):
705705

706706
# show cursor text
707707
overlay_text = None
708-
self._cusor_text.setVisible(False)
708+
self._cursor_text.setVisible(False)
709709
if not self.ALT_state:
710710
if self.SHIFT_state:
711711
overlay_text = '\n SHIFT:\n Toggle/Extend Selection'
@@ -715,9 +715,9 @@ def keyPressEvent(self, event):
715715
if self.pipe_slicing:
716716
overlay_text = '\n ALT + SHIFT:\n Pipe Slicer Enabled'
717717
if overlay_text:
718-
self._cusor_text.setPlainText(overlay_text)
719-
self._cusor_text.setPos(self.mapToScene(self._previous_pos))
720-
self._cusor_text.setVisible(True)
718+
self._cursor_text.setPlainText(overlay_text)
719+
self._cursor_text.setPos(self.mapToScene(self._previous_pos))
720+
self._cursor_text.setVisible(True)
721721

722722
super(NodeViewer, self).keyPressEvent(event)
723723

@@ -737,8 +737,8 @@ def keyReleaseEvent(self, event):
737737
super(NodeViewer, self).keyReleaseEvent(event)
738738

739739
# hide and reset cursor text.
740-
self._cusor_text.setPlainText('')
741-
self._cusor_text.setVisible(False)
740+
self._cursor_text.setPlainText('')
741+
self._cursor_text.setVisible(False)
742742

743743
# --- scene events ---
744744

0 commit comments

Comments
 (0)