13
0

Remember radio button state across normalize dialogue invocations.

git-svn-id: svn://localhost/ardour2/branches/3.0@7941 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-10-29 00:40:08 +00:00
parent 392875a2bb
commit 90a82c8653
2 changed files with 6 additions and 0 deletions

View File

@ -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;
}

View File

@ -44,4 +44,5 @@ private:
Gtk::ProgressBar* _progress_bar;
static double _last_normalization_value;
static bool _last_normalize_individually;
};