Fix erroneous reset of visible channels in audio level dialog when changing gain.
authorCarl Hetherington <cth@carlh.net>
Sat, 16 Nov 2013 16:01:58 +0000 (16:01 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 16 Nov 2013 16:01:58 +0000 (16:01 +0000)
ChangeLog
src/wx/audio_panel.cc
src/wx/audio_plot.cc

index 0b6af2a4bb828ea94aa34a129e8eab205da7de87..d5d6d020d4a86f3561fa55a08387e7e9c00b340e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-16  Carl Hetherington  <cth@carlh.net>
+
+       * Fix erroneous reset of visible channels in audio
+       level dialog when changing gain.
+
 2013-11-15  Carl Hetherington  <cth@carlh.net>
 
        * Use 2 decimal places for gamma controls instead
index 56fcf5c322bdfd16a8d7f891d571e61a147b14a8..6b30c0dd2030434877c353df61ede6e689da58da 100644 (file)
@@ -125,10 +125,6 @@ AudioPanel::film_content_changed (int property)
                fcs = dynamic_pointer_cast<FFmpegContent> (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);
index 7ed792351bb30e49ecbfa33fdb1ad12b72a3e286..f78885772ce033e682a1e9d178d85c93441b2b45 100644 (file)
@@ -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) {