set_colour(DecodeColours[index % countof(DecodeColours)]);
connect(decoder_stack_.get(), SIGNAL(new_decode_data()),
set_colour(DecodeColours[index % countof(DecodeColours)]);
connect(decoder_stack_.get(), SIGNAL(new_decode_data()),
- 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);
// Iterate through the rows
int y = get_visual_y();
pair<uint64_t, uint64_t> sample_range = get_sample_range(
// Iterate through the rows
int y = get_visual_y();
pair<uint64_t, uint64_t> sample_range = get_sample_range(
// Draw the hatching
draw_unresolved_period(p, annotation_height, pp.left(), pp.right());
// Draw the hatching
draw_unresolved_period(p, annotation_height, pp.left(), pp.right());
// Update the maximum row count if needed
max_visible_rows_ = std::max(max_visible_rows_, (int)visible_rows_.size());
}
// Update the maximum row count if needed
max_visible_rows_ = std::max(max_visible_rows_, (int)visible_rows_.size());
}
for (const QString &ann_text : a.annotations()) {
const int w = p.boundingRect(QRectF(), 0, ann_text).width();
// Annotation wide enough to fit a label? Don't put it in a block then
for (const QString &ann_text : a.annotations()) {
const int w = p.boundingRect(QRectF(), 0, ann_text).width();
// Annotation wide enough to fit a label? Don't put it in a block then