mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-25 15:47:25 +08: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:
parent
d4c949dab6
commit
fe18ce16fb
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user