mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 19:12:17 +00:00
MSW specific: Fixed assert "Assert failure" failed in
wxPaintDCImpl::wxPaintDCImpl(): wxPaintDCImpl may be created only in EVT_PAINT handler
This commit is contained in:
@@ -178,7 +178,7 @@ wxPoint OG_CustomCtrl::get_pos(const Line& line, Field* field_in/* = nullptr*/)
|
|||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
// when we use 2 monitors with different DPIs, GetTextExtent() return value for the primary display
|
// when we use 2 monitors with different DPIs, GetTextExtent() return value for the primary display
|
||||||
// so, use dc.GetMultiLineTextExtent on Windows
|
// so, use dc.GetMultiLineTextExtent on Windows
|
||||||
wxPaintDC dc(this);
|
wxClientDC dc(this);
|
||||||
dc.SetFont(m_font);
|
dc.SetFont(m_font);
|
||||||
dc.GetMultiLineTextExtent(label, &label_w, &label_h);
|
dc.GetMultiLineTextExtent(label, &label_w, &label_h);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user