From f69938a9c45e3741695bcb29b057167063a5ed71 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 30 Apr 2018 22:24:35 +0200 Subject: Add option to disable plotting collected signal in analysis. --- gtk2_ardour/plugin_eq_gui.cc | 18 ++++++++++++------ gtk2_ardour/plugin_eq_gui.h | 1 + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index 31e220555a..f40b22eddb 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -120,6 +120,10 @@ PluginEqGui::PluginEqGui(boost::shared_ptr pluginInsert) dBSelectBin->add( *manage(dBComboLabel)); dBSelectBin->add( *manage(dBScaleCombo)); + // Phase checkbutton + _signal_button = new Gtk::CheckButton (_("Plot live signal")); + _signal_button->set_active(true); + // Phase checkbutton _phase_button = new Gtk::CheckButton (_("Show phase")); _phase_button->set_active(true); @@ -131,10 +135,11 @@ PluginEqGui::PluginEqGui(boost::shared_ptr pluginInsert) _pointer_info->set_name("PluginAnalysisInfoLabel"); // populate table - attach( *manage(_analysis_area), 1, 4, 1, 2); - attach( *manage(dBSelectBin), 1, 2, 2, 3, Gtk::SHRINK, Gtk::SHRINK); - attach( *manage(_phase_button), 2, 3, 2, 3, Gtk::SHRINK, Gtk::SHRINK); - attach( *manage(_pointer_info), 3, 4, 2, 3, Gtk::FILL, Gtk::SHRINK); + attach (*manage(_analysis_area), 0, 4, 0, 1); + attach (*manage(dBSelectBin), 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK); + attach (*manage(_signal_button), 1, 2, 1, 2, Gtk::SHRINK, Gtk::SHRINK); + attach (*manage(_phase_button), 2, 3, 1, 2, Gtk::SHRINK, Gtk::SHRINK); + attach (*manage(_pointer_info), 3, 4, 1, 2, Gtk::FILL, Gtk::SHRINK); } PluginEqGui::~PluginEqGui() @@ -535,8 +540,9 @@ PluginEqGui::redraw_analysis_area() } plot_impulse_amplitude(_analysis_area, cr); - // TODO: make this optional - plot_signal_amplitude_difference(_analysis_area, cr); + if (_signal_button->get_active()) { + plot_signal_amplitude_difference(_analysis_area, cr); + } cairo_destroy(cr); } diff --git a/gtk2_ardour/plugin_eq_gui.h b/gtk2_ardour/plugin_eq_gui.h index ec6e7364ef..2805934175 100644 --- a/gtk2_ardour/plugin_eq_gui.h +++ b/gtk2_ardour/plugin_eq_gui.h @@ -142,6 +142,7 @@ private: Gtk::ComboBox *dBScaleCombo; Glib::RefPtr dBScaleModel; + Gtk::CheckButton *_signal_button; Gtk::CheckButton *_phase_button; // signals and connections -- cgit v1.2.3