From 2ccc67a0268395b1d241cb729170009feef397dd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 16 Nov 2013 16:01:58 +0000 Subject: [PATCH] Fix erroneous reset of visible channels in audio level dialog when changing gain. --- ChangeLog | 5 +++++ src/wx/audio_panel.cc | 8 ++++---- src/wx/audio_plot.cc | 1 - 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b6af2a4b..d5d6d020d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-11-16 Carl Hetherington + + * Fix erroneous reset of visible channels in audio + level dialog when changing gain. + 2013-11-15 Carl Hetherington * Use 2 decimal places for gamma controls instead diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc index 56fcf5c32..6b30c0dd2 100644 --- a/src/wx/audio_panel.cc +++ b/src/wx/audio_panel.cc @@ -125,10 +125,6 @@ AudioPanel::film_content_changed (int property) fcs = dynamic_pointer_cast (acs); } - if (_audio_dialog && acs) { - _audio_dialog->set_content (acs); - } - if (property == AudioContentProperty::AUDIO_MAPPING) { _mapping->set (acs ? acs->audio_mapping () : AudioMapping ()); _sizer->Layout (); @@ -260,6 +256,10 @@ void AudioPanel::content_selection_changed () { AudioContentList sel = _editor->selected_audio_content (); + + if (_audio_dialog && sel.size() == 1) { + _audio_dialog->set_content (sel.front ()); + } _gain->set_content (sel); _delay->set_content (sel); diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc index 7ed792351..f78885772 100644 --- a/src/wx/audio_plot.cc +++ b/src/wx/audio_plot.cc @@ -146,7 +146,6 @@ AudioPlot::paint () gc->StrokePath (grid); gc->DrawText (_("Time"), data_width, _height - _y_origin + db_label_height / 2); - if (_type_visible[AudioPoint::PEAK]) { for (int c = 0; c < MAX_AUDIO_CHANNELS; ++c) { -- 2.30.2