Bycelium / PyFlow

An open-source tool for visual and modular block programming in python
GNU General Public License v3.0
1.27k stars 52 forks source link

Deleting children block crashes the app #263

Closed AlexandreSajus closed 2 years ago

AlexandreSajus commented 2 years ago

Pressing Delete in this configuration crashes the app: image

with error:

Traceback (most recent call last):
  File "C:\Users\asaju\Desktop\Pyflow\OpenCodeBlocks\pyflow\graphics\window.py", line 424, in onEditDelete
    current_window.view.deleteSelected()
  File "C:\Users\asaju\Desktop\Pyflow\OpenCodeBlocks\pyflow\graphics\view.py", line 384, in deleteSelected
    selected_item.remove()
  File "C:\Users\asaju\Desktop\Pyflow\OpenCodeBlocks\pyflow\blocks\block.py", line 176, in remove
    socket.remove()
  File "C:\Users\asaju\Desktop\Pyflow\OpenCodeBlocks\pyflow\core\socket.py", line 113, in remove
    self.block.sockets_in.remove(self)
ValueError: list.remove(x): x not in list