diff options
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/export_preset_selector.cc | 12 | ||||
-rw-r--r-- | gtk2_ardour/export_preset_selector.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/export_preset_selector.cc b/gtk2_ardour/export_preset_selector.cc index 551dbf58ad..c0cf53036c 100644 --- a/gtk2_ardour/export_preset_selector.cc +++ b/gtk2_ardour/export_preset_selector.cc @@ -51,7 +51,7 @@ ExportPresetSelector::ExportPresetSelector () : select_connection = entry.signal_changed().connect (sigc::mem_fun (*this, &ExportPresetSelector::update_selection)); save_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportPresetSelector::save_current)); - new_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportPresetSelector::save_current)); + new_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportPresetSelector::create_new)); remove_button.signal_clicked().connect (sigc::mem_fun (*this, &ExportPresetSelector::remove_current)); show_all_children (); @@ -128,6 +128,16 @@ ExportPresetSelector::update_selection () } void +ExportPresetSelector::create_new () +{ + if (!profile_manager) { return; } + + previous = current = profile_manager->new_preset (entry.get_entry()->get_text()); + sync_with_manager (); + update_selection (); // Update preset widget states +} + +void ExportPresetSelector::save_current () { if (!profile_manager) { return; } diff --git a/gtk2_ardour/export_preset_selector.h b/gtk2_ardour/export_preset_selector.h index 4fd2dde3da..73211cb523 100644 --- a/gtk2_ardour/export_preset_selector.h +++ b/gtk2_ardour/export_preset_selector.h @@ -48,6 +48,7 @@ class ExportPresetSelector : public Gtk::HBox void sync_with_manager (); void update_selection (); + void create_new (); void save_current (); void remove_current (); |