mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-31 00:52:51 +00:00
One more refactoring in 3DScene (select group/drag group)
This commit is contained in:
@@ -27,7 +27,7 @@ sub new {
|
||||
$self->{on_select_object} = sub {};
|
||||
$self->{on_double_click} = sub {};
|
||||
$self->{on_right_click} = sub {};
|
||||
$self->{on_instance_moved} = sub {};
|
||||
$self->{on_instances_moved} = sub {};
|
||||
|
||||
$self->{objects_brush} = Wx::Brush->new(Wx::Colour->new(210,210,210), wxSOLID);
|
||||
$self->{selected_brush} = Wx::Brush->new(Wx::Colour->new(255,128,128), wxSOLID);
|
||||
@@ -63,9 +63,9 @@ sub on_right_click {
|
||||
$self->{on_right_click} = $cb;
|
||||
}
|
||||
|
||||
sub on_instance_moved {
|
||||
sub on_instances_moved {
|
||||
my ($self, $cb) = @_;
|
||||
$self->{on_instance_moved} = $cb;
|
||||
$self->{on_instances_moved} = $cb;
|
||||
}
|
||||
|
||||
sub repaint {
|
||||
@@ -211,7 +211,7 @@ sub mouse_event {
|
||||
}
|
||||
$self->Refresh;
|
||||
} elsif ($event->LeftUp) {
|
||||
$self->{on_instance_moved}->(@{ $self->{drag_object} })
|
||||
$self->{on_instances_moved}->()
|
||||
if $self->{drag_object};
|
||||
$self->{drag_start_pos} = undef;
|
||||
$self->{drag_object} = undef;
|
||||
|
||||
Reference in New Issue
Block a user