From a147530d2a15232bf45c8f331c417ff18c09bde6 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sat, 11 Aug 2012 16:05:17 +0200 Subject: [PATCH] Explicitly avoid passing arguments to remove when called from the event handler Wx passes some objects to the callbacks, and we want to ignore those. --- lib/Slic3r/GUI/Plater.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm index ee7e536905..7155f21eec 100644 --- a/lib/Slic3r/GUI/Plater.pm +++ b/lib/Slic3r/GUI/Plater.pm @@ -125,7 +125,7 @@ sub new { $self->selection_changed(0); $self->object_list_changed; EVT_BUTTON($self, $self->{btn_load}, \&load); - EVT_BUTTON($self, $self->{btn_remove}, \&remove); + EVT_BUTTON($self, $self->{btn_remove}, sub { $self->remove() }); # explicitly pass no argument to remove EVT_BUTTON($self, $self->{btn_reset}, \&reset); EVT_BUTTON($self, $self->{btn_arrange}, \&arrange); EVT_BUTTON($self, $self->{btn_export_gcode}, \&export_gcode);