mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 23:17:35 -06:00
QoL: Port profile value transfer on profile diff dialog from PrusaSlicer (#3737)
* DiffDialog: Implemented a transfer of options from one preset to another Related to [Feature Request] #5384 - Copy values in Profile comparaison dialog Cherry-picked from prusa3d/PrusaSlicer@0b8d7380ff Co-authored-by: YuSanka <yusanka@gmail.com> * Remove save button * Sync with latest PS * Use Orca button style * Show tips about trasnfer disabled --------- Co-authored-by: YuSanka <yusanka@gmail.com>
This commit is contained in:
parent
48541be681
commit
55b6f2a588
13 changed files with 422 additions and 108 deletions
|
@ -3758,8 +3758,7 @@ void GUI_App::request_user_logout()
|
|||
bool transfer_preset_changes = false;
|
||||
wxString header = _L("Some presets are modified.") + "\n" +
|
||||
_L("You can keep the modifield presets to the new project, discard or save changes as new presets.");
|
||||
using ab = UnsavedChangesDialog::ActionButtons;
|
||||
wxGetApp().check_and_keep_current_preset_changes(_L("User logged out"), header, ab::KEEP | ab::SAVE, &transfer_preset_changes);
|
||||
wxGetApp().check_and_keep_current_preset_changes(_L("User logged out"), header, ActionButtons::KEEP | ActionButtons::SAVE, &transfer_preset_changes);
|
||||
|
||||
m_device_manager->clean_user_info();
|
||||
GUI::wxGetApp().sidebar().load_ams_list({}, {});
|
||||
|
@ -5606,11 +5605,11 @@ std::vector<std::pair<unsigned int, std::string>> GUI_App::get_selected_presets(
|
|||
bool GUI_App::check_and_save_current_preset_changes(const wxString& caption, const wxString& header, bool remember_choice/* = true*/, bool dont_save_insted_of_discard/* = false*/)
|
||||
{
|
||||
if (has_current_preset_changes()) {
|
||||
int act_buttons = UnsavedChangesDialog::ActionButtons::SAVE;
|
||||
int act_buttons = ActionButtons::SAVE;
|
||||
if (dont_save_insted_of_discard)
|
||||
act_buttons |= UnsavedChangesDialog::ActionButtons::DONT_SAVE;
|
||||
act_buttons |= ActionButtons::DONT_SAVE;
|
||||
if (remember_choice)
|
||||
act_buttons |= UnsavedChangesDialog::ActionButtons::REMEMBER_CHOISE;
|
||||
act_buttons |= ActionButtons::REMEMBER_CHOISE;
|
||||
UnsavedChangesDialog dlg(caption, header, "", act_buttons);
|
||||
if (dlg.ShowModal() == wxID_CANCEL)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue