diff options
author | Robert Jonsson <spamatica@gmail.com> | 2011-05-04 19:52:20 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2011-05-04 19:52:20 +0000 |
commit | 548a9ee76ec16b19f7fc3a387890585575b08321 (patch) | |
tree | 14732b01b62842493af849e948acb030c7784437 /muse2/muse | |
parent | 4e5287c75c8f9cd2560120ee3a9cf17e39b9b477 (diff) |
feedback display fix
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/plugin.cpp | 2 | ||||
-rw-r--r-- | muse2/muse/widgets/verticalmeter.cpp | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp index bd33fb15..cc3977aa 100644 --- a/muse2/muse/plugin.cpp +++ b/muse2/muse/plugin.cpp @@ -3564,7 +3564,7 @@ PluginGui::PluginGui(PluginIBase* p) if(LADSPA_IS_HINT_INTEGER(range.HintDescriptor)) mType=Meter::DBMeter; VerticalMeter* m = new VerticalMeter(this, mType); - printf("lower =%f upper=%f dlower=%f dupper=%f\n", lower, upper,dlower,dupper); + //printf("lower =%f upper=%f dlower=%f dupper=%f\n", lower, upper,dlower,dupper); m->setRange(dlower, dupper); m->setVal(dval); diff --git a/muse2/muse/widgets/verticalmeter.cpp b/muse2/muse/widgets/verticalmeter.cpp index ca846886..dbe50723 100644 --- a/muse2/muse/widgets/verticalmeter.cpp +++ b/muse2/muse/widgets/verticalmeter.cpp @@ -122,11 +122,13 @@ void VerticalMeter::paintEvent(QPaintEvent* /*ev*/) if(mtype == DBMeter) - xv = val == 0 ? w : int(((maxScale - (fast_log10(val) * 20.0)) * w)/range); - else - xv = val == 0 ? w : int(((maxScale - val) * w)/range); + xv = int(((maxScale - (fast_log10(val) * 20.0)) * w)/range); + else { + xv = int(((maxScale - val) * w)/range); + } - if(xv > w) xv = w; + if(xv > w) + xv = w; // Draw the red, green, and yellow sections. drawVU(p, w, h, xv); |