projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35365c6
)
Fix #719 by calculating the decoder trace height dynamically
author
Soeren Apel
<soeren@apelpie.net>
Tue, 29 Dec 2015 22:13:53 +0000
(23:13 +0100)
committer
Uwe Hermann
<uwe@hermann-uwe.de>
Wed, 30 Dec 2015 22:15:52 +0000
(23:15 +0100)
pv/view/decodetrace.cpp
patch
|
blob
|
history
diff --git
a/pv/view/decodetrace.cpp
b/pv/view/decodetrace.cpp
index 31ea9d73647f42ba7436753a305f267a235337d3..dd39b321b9d789208d1e341dec55260e67efd181 100644
(file)
--- a/
pv/view/decodetrace.cpp
+++ b/
pv/view/decodetrace.cpp
@@
-160,10
+160,10
@@
const std::shared_ptr<pv::data::DecoderStack>& DecodeTrace::decoder() const
pair<int, int> DecodeTrace::v_extents() const
{
- /// @todo Replace this with an implementation that knows the true
- /// height of the trace
const int row_height = (ViewItemPaintParams::text_height() * 6) / 4;
- return make_pair(-row_height / 2, row_height * 7 / 2);
+ const int rows = visible_rows_.size();
+
+ return make_pair(-row_height, row_height * rows);
}
void DecodeTrace::paint_back(QPainter &p, const ViewItemPaintParams &pp)