Skip to content

Commit

Permalink
remove existing function_plotter nodes before loading new functions (#92
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Snafuh authored Mar 19, 2024
1 parent 5c8f22c commit df1ceb0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addons/easy_charts/control_charts/chart.gd
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func load_functions(functions: Array[Function]) -> void:
self.y = []

function_legend.clear()

# Remove existing function_plotters
for function_plotter in functions_box.get_children():
functions_box.remove_child(function_plotter)
function_plotter.queue_free()

for function in functions:
# Load x and y values
Expand Down

0 comments on commit df1ceb0

Please sign in to comment.