From fe18ce16fb633ddd6054ed3f25fcdcd371a202c0 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 7 Dec 2020 12:18:21 +0100 Subject: [PATCH] MSW specific: Fixed assert "Assert failure" failed in wxPaintDCImpl::wxPaintDCImpl(): wxPaintDCImpl may be created only in EVT_PAINT handler --- src/slic3r/GUI/OG_CustomCtrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/OG_CustomCtrl.cpp b/src/slic3r/GUI/OG_CustomCtrl.cpp index 8469b1a4b6..a8ead0aabb 100644 --- a/src/slic3r/GUI/OG_CustomCtrl.cpp +++ b/src/slic3r/GUI/OG_CustomCtrl.cpp @@ -178,7 +178,7 @@ wxPoint OG_CustomCtrl::get_pos(const Line& line, Field* field_in/* = nullptr*/) #ifdef __WXMSW__ // when we use 2 monitors with different DPIs, GetTextExtent() return value for the primary display // so, use dc.GetMultiLineTextExtent on Windows - wxPaintDC dc(this); + wxClientDC dc(this); dc.SetFont(m_font); dc.GetMultiLineTextExtent(label, &label_w, &label_h); #else