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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-05-24 13:19:06 +0300
committerYuSanka <yusanka@gmail.com>2019-05-24 13:37:26 +0300
commit5eab933fc2d51c25480eeb2370f88307dd2c2dc9 (patch)
treeee7c216ae53b6cda7d1ba3a360c6e8aa99424609 /src
parent0a43cf0674981d0c0e8117e699effcfb7e8e2380 (diff)
Workaround for #2331
Diffstat (limited to 'src')
-rw-r--r--src/slic3r/GUI/Tab.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index 5777cbc0f..6cd270e5b 100644
--- a/src/slic3r/GUI/Tab.cpp
+++ b/src/slic3r/GUI/Tab.cpp
@@ -2234,6 +2234,18 @@ void TabPrinter::build_unregular_pages()
* */
Freeze();
+#ifdef __WXMSW__
+ /* Workaround for correct layout of controls inside the created page:
+ * In some _strange_ way we should we should imitate page resizing.
+ */
+ auto layout_page = [this](PageShp page)
+ {
+ const wxSize& sz = page->GetSize();
+ page->SetSize(sz.x + 1, sz.y + 1);
+ page->SetSize(sz);
+ };
+#endif //__WXMSW__
+
// Add/delete Kinematics page according to is_marlin_flavor
size_t existed_page = 0;
for (int i = n_before_extruders; i < m_pages.size(); ++i) // first make sure it's not there already
@@ -2247,6 +2259,9 @@ void TabPrinter::build_unregular_pages()
if (existed_page < n_before_extruders && is_marlin_flavor) {
auto page = build_kinematics_page();
+#ifdef __WXMSW__
+ layout_page(page);
+#endif
m_pages.insert(m_pages.begin() + n_before_extruders, page);
}
@@ -2318,6 +2333,10 @@ void TabPrinter::build_unregular_pages()
optgroup = page->new_optgroup(_(L("Preview")));
optgroup->append_single_option_line("extruder_colour", extruder_idx);
+
+#ifdef __WXMSW__
+ layout_page(page);
+#endif
}
// # remove extra pages