Fix off-by-one channel when editing audio map levels numerically. master v2.14.7
authorCarl Hetherington <cth@carlh.net>
Tue, 28 May 2019 00:06:25 +0000 (00:06 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 28 May 2019 00:06:25 +0000 (00:06 +0000)
src/wx/audio_mapping_view.cc

index 7a33029..634d2fe 100644 (file)
@@ -507,11 +507,9 @@ AudioMappingView::minus6dB ()
 void
 AudioMappingView::edit ()
 {
-       int const d = _menu_output - 1;
-
-       AudioGainDialog* dialog = new AudioGainDialog (this, _menu_input, _menu_output - 1, _map.get(_menu_input, d));
+       AudioGainDialog* dialog = new AudioGainDialog (this, _menu_input, _menu_output, _map.get(_menu_input, _menu_output));
        if (dialog->ShowModal() == wxID_OK) {
-               _map.set (_menu_input, d, dialog->value ());
+               _map.set (_menu_input, _menu_output, dialog->value ());
                map_values_changed ();
        }