Remember last normalization value when the dialog is re-opened.
authorCarl Hetherington <carl@carlh.net>
Sat, 20 Jun 2009 15:46:43 +0000 (15:46 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 20 Jun 2009 15:46:43 +0000 (15:46 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@5227 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor.cc
gtk2_ardour/editor.h
gtk2_ardour/editor_ops.cc

index 613c91f2b81e86cf345d4786354a013a18a5db15..c669d6b261a535fbd58b6d5c8a5de570f56e6961 100644 (file)
@@ -874,6 +874,8 @@ Editor::Editor ()
        Config->ParameterChanged.connect (mem_fun (*this, &Editor::parameter_changed));
        Route::SyncOrderKeys.connect (mem_fun (*this, &Editor::sync_order_keys));
 
+       _last_normalization_value = 0;
+
        constructed = true;
        instant_save ();
 }
index 66b65e7470eb2698c53c2994198cdce965568774..7f6aca7fbd1d7e24ecf8c67eb99c4d5a813b63d6 100644 (file)
@@ -1172,6 +1172,7 @@ class Editor : public PublicEditor
        void reverse_region ();
        void strip_region_silence ();
        void normalize_region ();
+       double _last_normalization_value;
        void denormalize_region ();
        void adjust_region_scale_amplitude (bool up);
        void quantize_region ();
index fcf9937e9085a9c0737cfac89a87dd40b061a2cf..0530664acd4b28052993192602691c6a7e390f2a 100644 (file)
@@ -4594,6 +4594,7 @@ Editor::normalize_region ()
        spin.set_increments (0.1, 1);
        spin.set_value (0);
        hbox.pack_start (spin);
+       spin.set_value (_last_normalization_value);
        hbox.pack_start (*manage (new Label (_("dbFS"))));
        hbox.show_all ();
        dialog.get_vbox()->pack_start (hbox);
@@ -4620,6 +4621,8 @@ Editor::normalize_region ()
 
        commit_reversible_command ();
        track_canvas->get_window()->set_cursor (*current_canvas_cursor);
+
+       _last_normalization_value = spin.get_value ();
 }