projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved propagation of drag event so that the scroll bars can be updated
[pulseview.git]
/
pv
/
view
/
viewport.cpp
diff --git
a/pv/view/viewport.cpp
b/pv/view/viewport.cpp
index 7d844d27bccadd71a287f5aeb784f9d5f1ad5f85..96111875570ee7e53bf0e9773285686acb01e8a8 100644
(file)
--- a/
pv/view/viewport.cpp
+++ b/
pv/view/viewport.cpp
@@
-41,18
+41,21
@@
Viewport::Viewport(View &parent) :
setMouseTracking(true);
setAutoFillBackground(true);
setBackgroundRole(QPalette::Base);
setMouseTracking(true);
setAutoFillBackground(true);
setBackgroundRole(QPalette::Base);
+
+ connect(&_view, SIGNAL(signals_moved()),
+ this, SLOT(on_signals_moved()));
}
int Viewport::get_total_height() const
{
}
int Viewport::get_total_height() const
{
- int h
eight
= 0;
+ int h = 0;
BOOST_FOREACH(const shared_ptr<Signal> s,
_view.session().get_signals()) {
assert(s);
BOOST_FOREACH(const shared_ptr<Signal> s,
_view.session().get_signals()) {
assert(s);
- h
eight += View::SignalHeight
;
+ h
= max(s->get_v_offset() + View::SignalHeight, h)
;
}
}
- return h
eight
;
+ return h;
}
void Viewport::paintEvent(QPaintEvent *event)
}
void Viewport::paintEvent(QPaintEvent *event)
@@
-142,5
+145,10
@@
void Viewport::draw_cursors_foreground(QPainter &p)
cursors.second.paint(p, r);
}
cursors.second.paint(p, r);
}
+void Viewport::on_signals_moved()
+{
+ update();
+}
+
} // namespace view
} // namespace pv
} // namespace view
} // namespace pv