Fix off-by-one channel when editing audio map levels numerically.
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:14:02 +0000 (01:14 +0100)
Forward-ported from bf14618d056dc6f1ed7f32f943a565d8f662049e in master.

src/wx/audio_mapping_view.cc

index 9be6c9bb9b0e36ef33450d6d450d24aeb7204071..fa8732648008d5823288ea5569dc72762655082a 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 ();
        }