From 46c311b2b075d2243025a2e0c7fb677c27baeeb2 Mon Sep 17 00:00:00 2001 From: "Julien \"_FrnchFrgg_\" RIVAUD" Date: Mon, 25 Jul 2016 00:46:49 +0200 Subject: [PATCH] Fix frequence display for plugin analysis mouse over When freq was changed to be an integer, the conversion to kHz became a truncation. Divide by the float 1000.0 to pass the correct value to the stringstream formatting routine. --- gtk2_ardour/plugin_eq_gui.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/plugin_eq_gui.cc b/gtk2_ardour/plugin_eq_gui.cc index c33e6b96bb..2ac9936d35 100644 --- a/gtk2_ardour/plugin_eq_gui.cc +++ b/gtk2_ardour/plugin_eq_gui.cc @@ -450,9 +450,9 @@ PluginEqGui::update_pointer_info(float x, float y) std::stringstream ss; ss << std::fixed; if (freq >= 10000) { - ss << std::setprecision (1) << freq / 1000 << "kHz"; + ss << std::setprecision (1) << freq / 1000.0 << "kHz"; } else if (freq >= 1000) { - ss << std::setprecision (2) << freq / 1000 << "kHz"; + ss << std::setprecision (2) << freq / 1000.0 << "kHz"; } else { ss << std::setprecision (0) << freq << "Hz"; } -- 2.30.2