mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 22:31:02 +00:00
fix: Home start shows Prepare or a blank window, and Prepare opens slowly (#15878)
This commit is contained in:
+12
-2
@@ -7165,12 +7165,18 @@ void Tab::restore_last_select_item()
|
||||
|
||||
bool Tab::page_build_pending() const
|
||||
{
|
||||
return m_active_page != nullptr && m_active_page->build_pending();
|
||||
return m_active_page != nullptr && (m_active_page->build_pending() || m_active_page->visibility_pending());
|
||||
}
|
||||
|
||||
bool Tab::page_build_step()
|
||||
{
|
||||
return m_active_page != nullptr && m_active_page->build_step(m_mode);
|
||||
if (m_active_page == nullptr)
|
||||
return false;
|
||||
if (m_active_page->build_pending())
|
||||
m_active_page->build_step(m_mode);
|
||||
else
|
||||
m_active_page->update_visibility(m_mode, true);
|
||||
return page_build_pending();
|
||||
}
|
||||
|
||||
void Tab::update_description_lines()
|
||||
@@ -8601,6 +8607,8 @@ void Page::update_visibility(ConfigOptionMode mode, bool update_contolls_visibil
|
||||
}
|
||||
|
||||
m_show = ret_val;
|
||||
if (update_contolls_visibility)
|
||||
m_visibility_applied = true;
|
||||
#ifdef __WXMSW__
|
||||
if (!m_show) return;
|
||||
// BBS: fix field control position
|
||||
@@ -8654,6 +8662,7 @@ bool Page::activate_group(size_t i, ConfigOptionMode mode, std::function<void()>
|
||||
auto& group = m_optgroups[i];
|
||||
if (!group->activate(throw_if_canceled))
|
||||
return false;
|
||||
m_visibility_applied = false;
|
||||
m_vsizer->Add(group->sizer, 0, wxEXPAND | (group->is_legend_line() ? (wxLEFT|wxTOP) : wxALL), m_parent->FromDIP(5)); // ORCA use less margin on parameters section
|
||||
group->update_visibility(mode);
|
||||
#if HIDE_FIRST_SPLIT_LINE
|
||||
@@ -8688,6 +8697,7 @@ void Page::clear()
|
||||
for (auto group : m_optgroups)
|
||||
group->clear();
|
||||
m_page_title = NULL;
|
||||
m_visibility_applied = false;
|
||||
}
|
||||
|
||||
void Page::msw_rescale()
|
||||
|
||||
Reference in New Issue
Block a user