Prevent excessive meter redraws for inactive meters at zero II
authorAndreas Müller <schnitzeltony@gmail.com>
Wed, 17 Oct 2018 20:10:41 +0000 (22:10 +0200)
committerAndreas Müller <schnitzeltony@gmail.com>
Wed, 17 Oct 2018 20:35:29 +0000 (22:35 +0200)
Same as be826f363522dbca96c8263d404c57c4fe9ff0e2

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
libs/canvas/meter.cc

index b539a1b4ae5015f0e427484772c296f27bef6c98..76e31bf588f5f46523fb966c3c85676fba7e94dc 100644 (file)
@@ -702,7 +702,7 @@ Meter::set (float lvl, float peak)
        if (pixwidth <= 0 || pixheight <=0) return;
 
        if (peak == -1) {
-               if (lvl >= current_peak) {
+               if (lvl >= current_peak && lvl > 0) {
                        current_peak = lvl;
                        hold_state = hold_cnt;
                }