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.
This commit is contained in:
Nicolas Dandrimont 2012-08-11 16:05:17 +02:00
parent 7b0d4cb4e1
commit a147530d2a

View file

@ -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);