FIX: [STUDIO-1574] not switch filament preset after wizard
Change-Id: Id830b6c8f4ffd76a0b58c51ba892a79f075c0cea
This commit is contained in:
parent
81e723711a
commit
588e79c76d
4 changed files with 9 additions and 10 deletions
|
@ -1094,6 +1094,9 @@ void PlaterPresetComboBox::update()
|
||||||
}
|
}
|
||||||
|
|
||||||
update_selection();
|
update_selection();
|
||||||
|
if (selected_system_preset != GetValue()) {
|
||||||
|
sendComboBoxEvent();
|
||||||
|
}
|
||||||
Thaw();
|
Thaw();
|
||||||
|
|
||||||
if (!tooltip.IsEmpty()) {
|
if (!tooltip.IsEmpty()) {
|
||||||
|
|
|
@ -795,7 +795,8 @@ bool GuideFrame::apply_config(AppConfig *app_config, PresetBundle *preset_bundle
|
||||||
first_added_preset = get_first_added_preset(old_presets, m_appconfig_new.get_section(section_name));
|
first_added_preset = get_first_added_preset(old_presets, m_appconfig_new.get_section(section_name));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
get_first_added_material_preset(AppConfig::SECTION_FILAMENTS, first_added_filament);
|
// Not switch filament
|
||||||
|
//get_first_added_material_preset(AppConfig::SECTION_FILAMENTS, first_added_filament);
|
||||||
|
|
||||||
//update the app_config
|
//update the app_config
|
||||||
app_config->set_section(AppConfig::SECTION_FILAMENTS, enabled_filaments);
|
app_config->set_section(AppConfig::SECTION_FILAMENTS, enabled_filaments);
|
||||||
|
@ -819,6 +820,7 @@ bool GuideFrame::run()
|
||||||
|
|
||||||
//p->set_run_reason(reason);
|
//p->set_run_reason(reason);
|
||||||
//p->set_start_page(start_page);
|
//p->set_start_page(start_page);
|
||||||
|
app.preset_bundle->export_selections(*app.app_config);
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(info) << "GuideFrame before ShowModal";
|
BOOST_LOG_TRIVIAL(info) << "GuideFrame before ShowModal";
|
||||||
if (this->ShowModal() == wxID_OK) {
|
if (this->ShowModal() == wxID_OK) {
|
||||||
|
|
|
@ -263,13 +263,7 @@ void ComboBox::keyDown(wxKeyEvent& event)
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
{
|
sendComboBoxEvent();
|
||||||
wxCommandEvent e(wxEVT_COMBOBOX);
|
|
||||||
e.SetEventObject(this);
|
|
||||||
e.SetId(GetId());
|
|
||||||
e.SetInt(GetSelection());
|
|
||||||
GetEventHandler()->ProcessEvent(e);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case WXK_TAB:
|
case WXK_TAB:
|
||||||
HandleAsNavigationKey(event);
|
HandleAsNavigationKey(event);
|
||||||
|
|
|
@ -74,6 +74,8 @@ protected:
|
||||||
|
|
||||||
void OnEdit() override;
|
void OnEdit() override;
|
||||||
|
|
||||||
|
void sendComboBoxEvent();
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) override;
|
WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) override;
|
||||||
#endif
|
#endif
|
||||||
|
@ -85,8 +87,6 @@ private:
|
||||||
void mouseWheelMoved(wxMouseEvent &event);
|
void mouseWheelMoved(wxMouseEvent &event);
|
||||||
void keyDown(wxKeyEvent &event);
|
void keyDown(wxKeyEvent &event);
|
||||||
|
|
||||||
void sendComboBoxEvent();
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue