Fix frequence display for plugin analysis mouse over
authorJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Sun, 24 Jul 2016 22:46:49 +0000 (00:46 +0200)
committerJulien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
Sun, 24 Jul 2016 22:46:49 +0000 (00:46 +0200)
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

index c33e6b96bbd6c1b62c741da371a690a12ce44d8f..2ac9936d35b30d61f1a4e869377dac761152203d 100644 (file)
@@ -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";
        }