diff --git a/share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm b/share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm index fef409c3..490bb2ec 100644 --- a/share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm +++ b/share/shutter/resources/modules/Shutter/Draw/DrawingTool.pm @@ -675,16 +675,16 @@ sub setup_right_vbox_c { #get current pixbuf my $pixbuf = $self->{_view}->get_pixbuf || $self->{_drawing_pixbuf}; - sub value_callback { + my $value_callback = sub { $self->{_selector}->set_selection({x=>$self->{_x_spin_w}->get_value, y=>$self->{_y_spin_w}->get_value, width=>$self->{_width_spin_w}->get_value, height=>$self->{_height_spin_w}->get_value}); - } + }; #X my $xw_label = Gtk3::Label->new($self->{_d}->get("X") . ":"); $self->{_x_spin_w} = Gtk3::SpinButton->new_with_range(0, $pixbuf->get_width, 1); $self->{_x_spin_w}->set_value(0); $self->{_x_spin_w_handler} = $self->{_x_spin_w}->signal_connect( - 'value-changed' => \&value_callback); + 'value-changed' => $value_callback); my $xw_hbox = Gtk3::HBox->new(FALSE, 5); $xw_hbox->pack_start($xw_label, FALSE, FALSE, 5); @@ -695,7 +695,7 @@ sub setup_right_vbox_c { $self->{_y_spin_w} = Gtk3::SpinButton->new_with_range(0, $pixbuf->get_height, 1); $self->{_y_spin_w}->set_value(0); $self->{_y_spin_w_handler} = $self->{_y_spin_w}->signal_connect( - 'value-changed' => \&value_callback); + 'value-changed' => $value_callback); my $yw_hbox = Gtk3::HBox->new(FALSE, 5); $yw_hbox->pack_start($yw_label, FALSE, FALSE, 5); @@ -706,7 +706,7 @@ sub setup_right_vbox_c { $self->{_width_spin_w} = Gtk3::SpinButton->new_with_range(0, $pixbuf->get_width, 1); $self->{_width_spin_w}->set_value(0); $self->{_width_spin_w_handler} = $self->{_width_spin_w}->signal_connect( - 'value-changed' => \&value_callback); + 'value-changed' => $value_callback); my $ww_hbox = Gtk3::HBox->new(FALSE, 5); $ww_hbox->pack_start($widthw_label, FALSE, FALSE, 5); @@ -717,7 +717,7 @@ sub setup_right_vbox_c { $self->{_height_spin_w} = Gtk3::SpinButton->new_with_range(0, $pixbuf->get_height, 1); $self->{_height_spin_w}->set_value(0); $self->{_height_spin_w_handler} = $self->{_height_spin_w}->signal_connect( - 'value-changed' => \&value_callback); + 'value-changed' => $value_callback); my $hw_hbox = Gtk3::HBox->new(FALSE, 5); $hw_hbox->pack_start($heightw_label, FALSE, FALSE, 5);