Skip to content

Commit

Permalink
bug fix, delete figures
Browse files Browse the repository at this point in the history
  • Loading branch information
luismariotti1 committed Aug 4, 2021
1 parent 24dc0f9 commit ee4be3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Figures/Curves/BSpline.gd
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ func _physics_process(_delta):


func delete():
is_select = false
queue_free()
controllers.clear()
selection_button._remove = true
Expand Down
3 changes: 2 additions & 1 deletion GUI/Display/Display.gd
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ func _input(event):
creating_regular = false

if event.is_action_pressed("delete_figure") and figures.size() > 0:
GF.delete_object()
if !(creating_irregular or creating_regular or creating_curve):
GF.delete_object()

if event.is_action_pressed("cancel") and (creating_irregular or creating_curve):
figures[figures.size() - 1].queue_free()
Expand Down

0 comments on commit ee4be3f

Please sign in to comment.