FIX: wxDisplay crash on wxNOT_FOUND

Change-Id: If7b936d361873e20fb71b7fc35c9d270cd39a763
This commit is contained in:
chunmao.guo authored and Lane.Wei committed 2022-08-26 09:25:59 +08:00
1 parent d4ddd8f470
commit af54a34567
5 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -2911,7 +2911,7 @@ ObjectTableDialog::ObjectTableDialog(wxWindow* parent, Plater* platerObj, Model
wxSize panel_size = m_obj_panel->get_init_size();
g_max_size_from_parent = maxSize;
if ((maxSize.GetWidth() == -1) || (maxSize.GetHeight() == -1)) {
wxDisplay display(wxDisplay::GetFromWindow(this));
wxDisplay display(this);
//auto drect = display.GetGeometry();
wxRect client_area = display.GetClientArea ();
g_max_size_from_parent.SetWidth(client_area.GetWidth());