Workaround for #2331
This commit is contained in:
parent
0a43cf0674
commit
5eab933fc2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user