]> sigrok.org Git - pulseview.git/commitdiff
View: Honor ENABLE_DECODE compiler switch
authorSoeren Apel <redacted>
Sun, 31 Jan 2016 13:12:44 +0000 (14:12 +0100)
committerSoeren Apel <redacted>
Sun, 31 Jan 2016 13:13:21 +0000 (14:13 +0100)
pv/view/view.cpp

index c9b08bf8c0445de0783d5bbb16d4d4275f5066f1..6ad7dea0822c0d6653a75b6b0ee2dd1e86a07e8b 100644 (file)
@@ -43,7 +43,6 @@
 #include <libsigrokcxx/libsigrokcxx.hpp>
 
 #include "analogsignal.hpp"
-#include "decodetrace.hpp"
 #include "header.hpp"
 #include "logicsignal.hpp"
 #include "ruler.hpp"
 #include "pv/data/logicsegment.hpp"
 #include "pv/util.hpp"
 
+#ifdef ENABLE_DECODE
+#include "decodetrace.hpp"
+#endif
+
 using boost::shared_lock;
 using boost::shared_mutex;
 
@@ -455,9 +458,11 @@ void View::enable_coloured_bg(bool state)
                if (l)
                        l->set_coloured_bg(state);
 
+#ifdef ENABLE_DECODE
                shared_ptr<DecodeTrace> d = dynamic_pointer_cast<DecodeTrace>(i);
                if (d)
                        d->set_coloured_bg(state);
+#endif
        }
 
        viewport_->update();