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:
Azi
2026-02-06 07:02:48 -08:00
committed by GitHub
parent bb30999673
commit e025860b2c
3 changed files with 35 additions and 8 deletions

View File

@@ -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