mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 12:16:30 +01:00
Properly revert FormatSpec changes on "cancel"
Previously the ExportFormatDialog saved changes to disk on "save" but did nothing on "cancel". The format changed *remained* modified in memory, just not saved (until the ExportProfileManager is re-instantiated)
This commit is contained in:
parent
9326ced760
commit
555dcd11fd
3 changed files with 5 additions and 0 deletions
|
|
@ -252,6 +252,7 @@ ExportFileNotebook::FilePage::FilePage (Session * s, ManagerPtr profile_manager,
|
||||||
format_selector.FormatEdited.connect (sigc::mem_fun (*this, &ExportFileNotebook::FilePage::save_format_to_manager));
|
format_selector.FormatEdited.connect (sigc::mem_fun (*this, &ExportFileNotebook::FilePage::save_format_to_manager));
|
||||||
format_selector.FormatRemoved.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::remove_format_profile));
|
format_selector.FormatRemoved.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::remove_format_profile));
|
||||||
format_selector.NewFormat.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::get_new_format));
|
format_selector.NewFormat.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::get_new_format));
|
||||||
|
format_selector.FormatReverted.connect (sigc::mem_fun (*profile_manager, &ExportProfileManager::revert_format_profile));
|
||||||
|
|
||||||
format_selector.CriticalSelectionChanged.connect (
|
format_selector.CriticalSelectionChanged.connect (
|
||||||
sigc::mem_fun (*this, &ExportFileNotebook::FilePage::critical_selection_changed));
|
sigc::mem_fun (*this, &ExportFileNotebook::FilePage::critical_selection_changed));
|
||||||
|
|
|
||||||
|
|
@ -159,6 +159,9 @@ ExportFormatSelector::open_edit_dialog (bool new_dialog)
|
||||||
update_format_description ();
|
update_format_description ();
|
||||||
FormatEdited (state->format);
|
FormatEdited (state->format);
|
||||||
CriticalSelectionChanged();
|
CriticalSelectionChanged();
|
||||||
|
} else {
|
||||||
|
FormatReverted (state->format);
|
||||||
|
CriticalSelectionChanged();
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ public:
|
||||||
sigc::signal<void, FormatPtr> FormatEdited;
|
sigc::signal<void, FormatPtr> FormatEdited;
|
||||||
sigc::signal<void, FormatPtr> FormatRemoved;
|
sigc::signal<void, FormatPtr> FormatRemoved;
|
||||||
sigc::signal<FormatPtr, FormatPtr> NewFormat;
|
sigc::signal<FormatPtr, FormatPtr> NewFormat;
|
||||||
|
sigc::signal<void, FormatPtr> FormatReverted;
|
||||||
|
|
||||||
/* Compatibility with other elements */
|
/* Compatibility with other elements */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue