mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
Fix new project crash on Windows if multi-extruder printer profile is edited (#9600)
Fix new project crash on Windows if profile is edited
This commit is contained in:
parent
1a5b238ba4
commit
3b658cba3b
2 changed files with 8 additions and 4 deletions
|
@ -590,7 +590,7 @@ Slic3r::GUI::PageShp Tab::add_options_page(const wxString& title, const std::str
|
|||
}
|
||||
// Initialize the page.
|
||||
//BBS: GUI refactor
|
||||
PageShp page(new Page(m_page_view, title, icon_idx, this));
|
||||
PageShp page = std::make_shared<Page>(m_page_view, title, icon_idx, this);
|
||||
// page->SetBackgroundStyle(wxBG_STYLE_SYSTEM);
|
||||
#ifdef __WINDOWS__
|
||||
// page->SetDoubleBuffered(true);
|
||||
|
@ -6263,8 +6263,12 @@ void Page::update_visibility(ConfigOptionMode mode, bool update_contolls_visibil
|
|||
#ifdef __WXMSW__
|
||||
if (!m_show) return;
|
||||
// BBS: fix field control position
|
||||
wxTheApp->CallAfter([this]() {
|
||||
for (auto group : m_optgroups) {
|
||||
wxTheApp->CallAfter([wp=std::weak_ptr<Page>(shared_from_this())]() {
|
||||
auto page = wp.lock();
|
||||
if (!page)
|
||||
return;
|
||||
|
||||
for (auto group : page->m_optgroups) {
|
||||
if (group->custom_ctrl) group->custom_ctrl->fixup_items_positions();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue