projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Link signals to probes
[pulseview.git]
/
pv
/
view
/
signal.cpp
diff --git
a/pv/view/signal.cpp
b/pv/view/signal.cpp
index 48e47f27aa9a49304dddc6d1feef879463183cf4..cdbb65b1638e5ac145c1aaa66cf6c3d99bf12971 100644
(file)
--- a/
pv/view/signal.cpp
+++ b/
pv/view/signal.cpp
@@
-20,6
+20,7
@@
#include <extdef.h>
#include <extdef.h>
+#include <assert.h>
#include <math.h>
#include <QApplication>
#include <math.h>
#include <QApplication>
@@
-35,11
+36,13
@@
const int Signal::LabelHighlightRadius = 6;
const QPen Signal::SignalAxisPen(QColor(128, 128, 128, 64));
const QPen Signal::SignalAxisPen(QColor(128, 128, 128, 64));
-Signal::Signal(QString name) :
- _name(name),
+Signal::Signal(const sr_probe *const probe) :
+ _probe(probe),
+ _name(probe->name),
_v_offset(0),
_selected(false)
{
_v_offset(0),
_selected(false)
{
+ assert(_probe);
}
QString Signal::get_name() const
}
QString Signal::get_name() const
@@
-86,6
+89,9
@@
void Signal::paint_label(QPainter &p, int y, int right, bool hover)
{
p.setBrush(_colour);
{
p.setBrush(_colour);
+ if (!_probe->enabled)
+ return;
+
const QColor colour = get_colour();
compute_text_size(p);
const QColor colour = get_colour();
compute_text_size(p);