projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use static signal offsets instead of offsets calculated on-the-fly
[pulseview.git]
/
pv
/
view
/
viewport.cpp
diff --git
a/pv/view/viewport.cpp
b/pv/view/viewport.cpp
index d9b0ff1b85af41c44aa32a4212974470e437dfe5..7d844d27bccadd71a287f5aeb784f9d5f1ad5f85 100644
(file)
--- a/
pv/view/viewport.cpp
+++ b/
pv/view/viewport.cpp
@@
-66,17
+66,15
@@
void Viewport::paintEvent(QPaintEvent *event)
draw_cursors_background(p);
// Plot the signal
draw_cursors_background(p);
// Plot the signal
-
int offset = -
_view.v_offset();
+
const int v_offset =
_view.v_offset();
BOOST_FOREACH(const shared_ptr<Signal> s, sigs)
{
assert(s);
BOOST_FOREACH(const shared_ptr<Signal> s, sigs)
{
assert(s);
- const QRect signal_rect(0, offset,
+ const QRect signal_rect(0,
s->get_v_offset() - v_
offset,
width(), View::SignalHeight);
s->paint(p, signal_rect, _view.scale(), _view.offset());
width(), View::SignalHeight);
s->paint(p, signal_rect, _view.scale(), _view.offset());
-
- offset += View::SignalHeight;
}
draw_cursors_foreground(p);
}
draw_cursors_foreground(p);