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:
parent
9215710c59
commit
46c311b2b0
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user