mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
feature:added option to save a profile as detached(no inheritance) (#7071)
* added option to save a profile as detached(no inheritance)
* Revert "added option to save a profile as detached(no inheritance)"
This reverts commit c1326c6dec.
* re-commiting the changes
* fixed conflicts with upstream
---------
Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -6340,17 +6340,18 @@ void Tab::save_preset(std::string name /*= ""*/, bool detach, bool save_to_proje
|
||||
// focus currently.is there anything better than this ?
|
||||
//! m_tabctrl->OnSetFocus();
|
||||
if (from_input) {
|
||||
SavePresetDialog dlg(m_parent, m_type, detach ? _u8L("Detached") : "");
|
||||
SavePresetDialog dlg(m_parent, m_type, m_mode, detach ? _u8L("Detached") : "");
|
||||
dlg.Show(false);
|
||||
dlg.input_name_from_other(input_name);
|
||||
wxCommandEvent evt(wxEVT_TEXT, GetId());
|
||||
dlg.GetEventHandler()->ProcessEvent(evt);
|
||||
dlg.confirm_from_other();
|
||||
name = input_name;
|
||||
detach = dlg.get_detach_value(m_type);
|
||||
}
|
||||
|
||||
if (name.empty()) {
|
||||
SavePresetDialog dlg(m_parent, m_type, detach ? _u8L("Detached") : "");
|
||||
SavePresetDialog dlg(m_parent, m_type, m_mode, detach ? _u8L("Detached") : "");
|
||||
if (!m_just_edit) {
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return;
|
||||
@@ -6358,6 +6359,7 @@ void Tab::save_preset(std::string name /*= ""*/, bool detach, bool save_to_proje
|
||||
name = dlg.get_name();
|
||||
//BBS: add project embedded preset relate logic
|
||||
save_to_project = dlg.get_save_to_project_selection(m_type);
|
||||
detach = dlg.get_detach_value(m_type);
|
||||
}
|
||||
|
||||
//BBS record current preset name
|
||||
|
||||
Reference in New Issue
Block a user