projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e8f0e5
)
DecodeTrace: Make sure first row's label width can be calculated
author
Soeren Apel
<soeren@apelpie.net>
Wed, 20 Apr 2016 16:15:12 +0000
(18:15 +0200)
committer
Soeren Apel
<soeren@apelpie.net>
Tue, 3 May 2016 19:11:33 +0000
(21:11 +0200)
Without a pen set, p.boundingRect() returns 0. All other rows
have their label text width calculated with a pen, which makes
p.boundingRect() work as intended. Fix this by setting a pen
before the first row is processed.
pv/view/decodetrace.cpp
patch
|
blob
|
history
diff --git
a/pv/view/decodetrace.cpp
b/pv/view/decodetrace.cpp
index 20de3755be482688be6cc2ce4f28220c2bd84f5c..9e41bc4ac1f515f0a457ce2bff384820b040447e 100644
(file)
--- a/
pv/view/decodetrace.cpp
+++ b/
pv/view/decodetrace.cpp
@@
-198,6
+198,9
@@
void DecodeTrace::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
return;
}
+ // Set default pen to allow for text width calculation
+ p.setPen(Qt::black);
+
// Iterate through the rows
int y = get_visual_y();
pair<uint64_t, uint64_t> sample_range = get_sample_range(