]> sigrok.org Git - pulseview.git/blobdiff - pv/view/decodetrace.cpp
Don't allow disabled probes to be selected
[pulseview.git] / pv / view / decodetrace.cpp
index c47a46ab469abd2f7063c02cd1e1a1417984a246..e4f02760eaa0b6b1719cdeb8bb323be3bd10a512 100644 (file)
@@ -25,6 +25,7 @@ extern "C" {
 #include <extdef.h>
 
 #include <boost/foreach.hpp>
+#include <boost/functional/hash.hpp>
 
 #include <QAction>
 #include <QApplication>
@@ -420,6 +421,9 @@ void DecodeTrace::draw_range(const pv::data::decode::Annotation &a, QPainter &p,
 
        QRectF rect(start + cap_width, y - h / 2,
                end - start - cap_width * 2, h);
+       if (rect.width() <= 4)
+               return;
+
        p.setPen(text_color);
 
        // Try to find an annotation that will fit