From 70ecb634b7e6bd29cf69b791abf92f3b819a5301 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 16 Jan 2020 15:38:59 +0100 Subject: [PATCH] fix gui artifacts on Windows --- sandboxes/opencsg/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sandboxes/opencsg/main.cpp b/sandboxes/opencsg/main.cpp index ec6c01789..adf9cc457 100644 --- a/sandboxes/opencsg/main.cpp +++ b/sandboxes/opencsg/main.cpp @@ -445,7 +445,7 @@ void MyFrame::activate_canvas_display() m_canvas->Bind(wxEVT_PAINT, [this](wxPaintEvent &) { // This is required even though dc is not used otherwise. - wxPaintDC dc(this); + wxPaintDC dc(m_canvas.get()); const wxSize csize = m_canvas->GetClientSize(); m_canvas->get_display()->set_screen_size(csize.x, csize.y); m_canvas->get_display()->repaint();