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.
This commit is contained in:
Julien "_FrnchFrgg_" RIVAUD 2016-07-25 00:46:49 +02:00
parent 9215710c59
commit 46c311b2b0

View 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";
}