From 55ee5d2e502e2d214425925b84bcf54c04f96f6e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 23 Nov 2017 09:22:21 +0100 Subject: [PATCH] Fix duplicate if(A) else if (A) condition Issue came to be from consolidating Session and UI configuration. Found by PVS-Studio - https://www.viva64.com/en/b/0540/ --- gtk2_ardour/ardour_ui_options.cc | 4 ---- gtk2_ardour/mixer_strip.cc | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 0a6bd683a6..d5fac401b3 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -514,10 +514,6 @@ ARDOUR_UI::parameter_changed (std::string p) } } else if (p == "layered-record-mode") { layered_button.set_active (_session->config.get_layered_record_mode ()); - } else if (p == "show-waveform-clipping") { - ArdourWaveView::WaveView::set_global_show_waveform_clipping (UIConfiguration::instance().get_show_waveform_clipping()); - } else if (p == "waveform-gradient-depth") { - ArdourWaveView::WaveView::set_global_gradient_depth (UIConfiguration::instance().get_waveform_gradient_depth()); } else if (p == "flat-buttons") { bool flat = UIConfiguration::instance().get_flat_buttons(); if (ArdourButton::flat_buttons () != flat) { diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 53ccf740d7..9c1bdeda9d 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -2388,6 +2388,7 @@ MixerStrip::parameter_changed (string p) _visibility.set_state (UIConfiguration::instance().get_mixer_strip_visibility ()); } else if (p == "track-name-number") { name_changed (); + update_track_number_visibility(); } else if (p == "use-monitor-bus") { if (monitor_section_button) { if (mute_button->get_parent()) { @@ -2406,8 +2407,6 @@ MixerStrip::parameter_changed (string p) mute_button->show(); } } - } else if (p == "track-name-number") { - update_track_number_visibility(); } }