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:
authorVojtech Kral <vojtech@kral.hk>2019-02-07 17:55:47 +0300
committerVojtech Kral <vojtech@kral.hk>2019-02-12 12:11:00 +0300
commit7d969a6f364328810e102bc9c127fbd644daaf31 (patch)
tree4058498a58a2d6ecd92b112c3d8968b832be8830 /src/slic3r/GUI/GUI_Utils.cpp
parentb0f54e5709a98549dc4811c555658bbca48dc197 (diff)
ConfigWizard: Bugfixes
Diffstat (limited to 'src/slic3r/GUI/GUI_Utils.cpp')
-rw-r--r--src/slic3r/GUI/GUI_Utils.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/slic3r/GUI/GUI_Utils.cpp b/src/slic3r/GUI/GUI_Utils.cpp
index db0264459..c1a3934b9 100644
--- a/src/slic3r/GUI/GUI_Utils.cpp
+++ b/src/slic3r/GUI/GUI_Utils.cpp
@@ -26,6 +26,22 @@ wxTopLevelWindow* find_toplevel_parent(wxWindow *window)
return nullptr;
}
+void on_window_geometry(wxTopLevelWindow *tlw, std::function<void()> callback)
+{
+ tlw->Bind(wxEVT_CREATE, [=](wxWindowCreateEvent &event) {
+#ifdef __linux__
+ // On Linux, the geometry is only available after wxEVT_CREATE + CallAfter
+ // cf. https://groups.google.com/forum/?pli=1#!topic/wx-users/fERSXdpVwAI
+ tlw->CallAfter([=]() {
+#endif
+ callback();
+#ifdef __linux__
+ });
+#endif
+ event.Skip();
+ });
+}
+
CheckboxFileDialog::ExtraPanel::ExtraPanel(wxWindow *parent)
: wxPanel(parent, wxID_ANY)