beyse / NodeEditor

A multi purpose node editor for flow-based programming

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copying a node crashes program

beyse opened this issue · comments

Describe the bug
When copying a node (Ctrl+C and Ctrl+V) the program crashes immediately

To Reproduce
Steps to reproduce the behavior:

  1. Open the program
  2. Drag a node (I used LoadImageNode) onto the canvas
  3. Select the node
  4. Press Ctrl+C on the keyboard to copy the node
  5. Deselect the node by clicking on the canvas
  6. Press Ctrl+V on the keyboard to paste the node
  7. Observe the program crash with this console output:
Traceback (most recent call last):
  File "..\..\nodeeditor\node_editor_window.py", line 295, in onEditPaste
    return self.getCurrentNodeEditorWidget().scene.clipboard.deserializeFromClipboard(data)
  File "..\..\nodeeditor\node_scene_clipboard.py", line 138, in deserializeFromClipboard
    new_node = self.scene.getNodeClassFromData(node_data)(self.scene)
AttributeError: 'Scene' object has no attribute 'getNodeClassFromData'

Expected behavior
No crash. Node copied without error

Screenshots
none

Desktop (please complete the following information):

  • OS: Windows 11

Additional context
none