summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-07-25 00:46:49 +0200
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>2016-07-25 00:46:49 +0200
commit46c311b2b075d2243025a2e0c7fb677c27baeeb2 (patch)
tree088a32de98ba20906c3bd6c17c1ac11117d63c82
parent9215710c5999678862a6535139ce14c507d754a2 (diff)
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.
-rw-r--r--gtk2_ardour/plugin_eq_gui.cc4
1 files 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";
}