Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@fr.fr>2020-05-13 22:13:54 +0300
committersupermerill <merill@fr.fr>2020-05-13 22:13:54 +0300
commita27258a8be70968564b255eaede4566dcdfb86e5 (patch)
treeec84c01abce2efa77e4c65b2f45f09d7edda5505
parent0b549078cc226e5d7e06235f8c9d0b9f0632833f (diff)
macos build fix
-rw-r--r--src/slic3r/GUI/GUI_Preview.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp
index c628b4fda..b60bd957d 100644
--- a/src/slic3r/GUI/GUI_Preview.cpp
+++ b/src/slic3r/GUI/GUI_Preview.cpp
@@ -20,6 +20,7 @@
#include <wx/choice.h>
#include <wx/combo.h>
#include <wx/checkbox.h>
+#include <wx/display.h>
// this include must follow the wxWidgets ones or it won't compile on Windows -> see http://trac.wxwidgets.org/ticket/2421
#include "libslic3r/Print.hpp"
@@ -210,7 +211,9 @@ bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view
return false;
//get display size to see if we have to compress the labels
- wxDisplay display(wxDisplay::GetFromWindow(parent));
+
+ const auto idx = wxDisplay::GetFromWindow(parent);
+ wxDisplay display(idx != wxNOT_FOUND ? idx : 0u);
wxRect screen = display.GetClientArea();
ScreenWidth width_screen = ScreenWidth::large;
if (screen.width < 1900)