From 3c43fb80815350a753e469cb3e6198d1731e1da9 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 8 Nov 2015 10:19:04 +0100 Subject: [PATCH] Fix rendering on Windows --- lib/Slic3r/GUI/Controller/PrinterPanel.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/GUI/Controller/PrinterPanel.pm b/lib/Slic3r/GUI/Controller/PrinterPanel.pm index a1b8687aab..dee150c194 100644 --- a/lib/Slic3r/GUI/Controller/PrinterPanel.pm +++ b/lib/Slic3r/GUI/Controller/PrinterPanel.pm @@ -542,7 +542,8 @@ sub new { my $white_brush = Wx::Brush->new(wxWHITE, wxSOLID); my $pen = Wx::Pen->new(Wx::Colour->new(200,200,200), 1, wxSOLID); EVT_ERASE_BACKGROUND($self, sub { - my $dc = Wx::PaintDC->new($self); + my ($self, $event) = @_; + my $dc = $event->GetDC; my $size = $self->GetSize; $dc->SetBrush($white_brush); $dc->SetPen($pen);