projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
752281d
)
DecodeTrace: Make an empty decode trace appear symmetrical
author
Soeren Apel
<soeren@apelpie.net>
Fri, 8 Apr 2016 16:32:41 +0000
(18:32 +0200)
committer
Soeren Apel
<soeren@apelpie.net>
Fri, 8 Apr 2016 21:34:45 +0000
(23:34 +0200)
pv/view/decodetrace.cpp
patch
|
blob
|
history
diff --git
a/pv/view/decodetrace.cpp
b/pv/view/decodetrace.cpp
index ab9514cd4e4da34e706c522ecb4244a123a38ad9..20de3755be482688be6cc2ce4f28220c2bd84f5c 100644
(file)
--- a/
pv/view/decodetrace.cpp
+++ b/
pv/view/decodetrace.cpp
@@
-169,7
+169,10
@@
pair<int, int> DecodeTrace::v_extents() const
{
const int row_height = (ViewItemPaintParams::text_height() * 6) / 4;
{
const int row_height = (ViewItemPaintParams::text_height() * 6) / 4;
- return make_pair(-row_height, row_height * max_visible_rows_);
+ // Make an empty decode trace appear symmetrical
+ const int row_count = max(1, max_visible_rows_);
+
+ return make_pair(-row_height, row_height * row_count);
}
void DecodeTrace::paint_back(QPainter &p, const ViewItemPaintParams &pp)
}
void DecodeTrace::paint_back(QPainter &p, const ViewItemPaintParams &pp)