Remember last normalization value when the dialog is re-opened.

git-svn-id: svn://localhost/ardour2/branches/3.0@5227 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-06-20 15:46:43 +00:00
parent f0bf3a0c19
commit 9dfa933c6e
3 changed files with 6 additions and 0 deletions

View 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 ();
}

View 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 ();

View 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 ();
}