Skip to content

Commit

Permalink
🔧 Make add block button use the empty.pfb file (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisFederico authored Feb 17, 2022
2 parents 584b84c + 1404c41 commit 59af190
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyflow/graphics/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,8 @@ def drag_edge(self, event: QMouseEvent, action="press"):
):
# Link a new CodeBlock under the selected block
parent: CodeBlock = item_at_click.block
new_block = CodeBlock()
self.scene().addItem(new_block)
empty_code_block_path: str = os.path.join(BLOCKFILES_PATH, "empty.pfb")
new_block = self.scene().create_block_from_file(empty_code_block_path, 0, 0)
parent.link_and_place(new_block)
scene.history.checkpoint(
"Created a new linked block", set_modified=True
Expand Down

0 comments on commit 59af190

Please sign in to comment.