summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog2
-rw-r--r--muse2/muse/plugin.cpp2
-rw-r--r--muse2/muse/widgets/verticalmeter.cpp10
3 files changed, 9 insertions, 5 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index d3e0d828..43f1e73f 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,5 @@
+04.05.2011:
+ - Fixed meter drawing for zero values in feedback parameters to plugin guis (rj)
02.05.2011:
- MusE 2.0beta released (rj)
01.05.2011:
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);