X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fviews%2Ftrace%2Flogicsignal.cpp;h=a5d0a5987774436e178b0e3f250ce46633538d7d;hp=f43ac37e7ebf5b4d583ca3862d856ba59763d02e;hb=bae42c1d8a6fbe65e412d56edecdd4b354908339;hpb=581724de334181fc5338f1efa87954264cf90520 diff --git a/pv/views/trace/logicsignal.cpp b/pv/views/trace/logicsignal.cpp index f43ac37..a5d0a59 100644 --- a/pv/views/trace/logicsignal.cpp +++ b/pv/views/trace/logicsignal.cpp @@ -258,10 +258,11 @@ void LogicSignal::paint_mid(QPainter &p, ViewItemPaintParams &pp) if (fill_high_areas) { // Any edge terminates a high area - const int width = x - rising_edge_x; - if (rising_edge_seen && (width > 0)) { - high_rects.emplace_back(rising_edge_x, high_offset, - width, signal_height_); + if (rising_edge_seen) { + const int width = x - rising_edge_x; + if (width > 0) + high_rects.emplace_back(rising_edge_x, high_offset, + width, signal_height_); rising_edge_seen = false; }