From 90a82c8653bbfa0e955c76979f74afcc579e2109 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 29 Oct 2010 00:40:08 +0000 Subject: [PATCH] Remember radio button state across normalize dialogue invocations. git-svn-id: svn://localhost/ardour2/branches/3.0@7941 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/normalize_dialog.cc | 5 +++++ gtk2_ardour/normalize_dialog.h | 1 + 2 files changed, 6 insertions(+) diff --git a/gtk2_ardour/normalize_dialog.cc b/gtk2_ardour/normalize_dialog.cc index 716bfa7c39..bed3a0275d 100644 --- a/gtk2_ardour/normalize_dialog.cc +++ b/gtk2_ardour/normalize_dialog.cc @@ -27,6 +27,7 @@ using namespace Gtk; double NormalizeDialog::_last_normalization_value = 0; +bool NormalizeDialog::_last_normalize_individually = true; NormalizeDialog::NormalizeDialog (bool more_than_one) : ArdourDialog (more_than_one ? _("Normalize regions") : _("Normalize region")) @@ -55,6 +56,9 @@ NormalizeDialog::NormalizeDialog (bool more_than_one) RadioButton* b = manage (new RadioButton (group, _("Normalize each region using the peak value of all regions"))); vbox->pack_start (*b); + _normalize_individually->set_active (_last_normalize_individually); + b->set_active (!_last_normalize_individually); + get_vbox()->pack_start (*vbox); } @@ -96,6 +100,7 @@ NormalizeDialog::run () { int const r = ArdourDialog::run (); _last_normalization_value = target (); + _last_normalize_individually = _normalize_individually->get_active (); return r; } diff --git a/gtk2_ardour/normalize_dialog.h b/gtk2_ardour/normalize_dialog.h index 1cb1ae1cb5..38ae912b76 100644 --- a/gtk2_ardour/normalize_dialog.h +++ b/gtk2_ardour/normalize_dialog.h @@ -44,4 +44,5 @@ private: Gtk::ProgressBar* _progress_bar; static double _last_normalization_value; + static bool _last_normalize_individually; };