Fix for #8254 - Change of Print/Filament/Printer Settings not detected

This commit is contained in:
YuSanka 2022-05-03 09:13:53 +02:00
parent 881a5dbf37
commit c4b6381acf
2 changed files with 15 additions and 3 deletions

View file

@ -706,6 +706,10 @@ void MainFrame::init_tabpanel()
// before the MainFrame is fully set up.
tab->OnActivate();
m_last_selected_tab = m_tabpanel->GetSelection();
#ifdef _MSW_DARK_MODE
if (wxGetApp().tabs_as_menu())
tab->SetFocus();
#endif
}
else
select_tab(size_t(0)); // select Plater
@ -2018,8 +2022,13 @@ void MainFrame::select_tab(size_t tab/* = size_t(-1)*/)
m_plater->SetFocus();
Layout();
}
else
else {
select(false);
#ifdef _MSW_DARK_MODE
if (wxGetApp().tabs_as_menu() && tab == 0)
m_plater->SetFocus();
#endif
}
// When we run application in ESettingsLayout::New or ESettingsLayout::Dlg mode, tabpanel is hidden from the very beginning
// and as a result Tab::update_changed_tree_ui() function couldn't update m_is_nonsys_values values,

View file

@ -490,8 +490,11 @@ bool PrintHostQueueDialog::load_user_data(int udt, std::vector<int>& vector)
auto* app_config = wxGetApp().app_config;
auto hasget = [app_config](const std::string& name, std::vector<int>& vector)->bool {
if (app_config->has(name)) {
vector.push_back(std::stoi(app_config->get(name)));
return true;
std::string val = app_config->get(name);
if (!val.empty() || val[0]!='\0') {
vector.push_back(std::stoi(val));
return true;
}
}
return false;
};