diff options
author | bubnikv <bubnikv@gmail.com> | 2016-10-24 15:07:38 +0300 |
---|---|---|
committer | bubnikv <bubnikv@gmail.com> | 2016-10-24 15:07:38 +0300 |
commit | 250ff451ba337a154b5de4ca5d16b425a55a5166 (patch) | |
tree | fccfff853ed46464a1e43edd14837ee047d92a4f /lib | |
parent | cc8b7390eedb6d1d2df87a55bb77fda279703f32 (diff) |
by alexrj: Fixes in GCodeSender to reset the connection after it breaks.
by alexrj: Fix in mouse handling of 2DBed.
by alexrj: ClipperUtils for ExPolygon vs. ExPolygon
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Slic3r/GUI/2DBed.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Slic3r/GUI/2DBed.pm b/lib/Slic3r/GUI/2DBed.pm index 3f116cf9c..388bc5a3a 100644 --- a/lib/Slic3r/GUI/2DBed.pm +++ b/lib/Slic3r/GUI/2DBed.pm @@ -11,7 +11,7 @@ use Wx qw(:misc :pen :brush :font :systemsettings wxTAB_TRAVERSAL wxSOLID); use Wx::Event qw(EVT_PAINT EVT_ERASE_BACKGROUND EVT_MOUSE_EVENTS EVT_SIZE); use base qw(Wx::Panel Class::Accessor); -__PACKAGE__->mk_accessors(qw(bed_shape interactive pos _scale_factor _shift on_move)); +__PACKAGE__->mk_accessors(qw(bed_shape interactive pos _scale_factor _shift on_move _painted)); sub new { my ($class, $parent, $bed_shape) = @_; @@ -165,12 +165,15 @@ sub _repaint { $dc->DrawLine($pos_px->[X]-15, $pos_px->[Y], $pos_px->[X]+15, $pos_px->[Y]); $dc->DrawLine($pos_px->[X], $pos_px->[Y]-15, $pos_px->[X], $pos_px->[Y]+15); } + + $self->_painted(1); } sub _mouse_event { my ($self, $event) = @_; return if !$self->interactive; + return if !$self->_painted; my $pos = $event->GetPosition; my $point = $self->to_units([ $pos->x, $pos->y ]); #]] |