fix: Show's an empty measure info by tooltips

This commit is contained in:
dreamsourcelabTAI 2023-04-04 11:17:55 +08:00
parent 8fd251dbb2
commit c1fb9aba7f
2 changed files with 5 additions and 1 deletions

View File

@ -403,6 +403,10 @@ public:
view::DecodeTrace* get_decoder_trace(int index);
view::Signal* get_signal_by_index(int index);
inline bool have_view_data(){
return get_signal_snapshot()->have_data();
}
private:
void set_cur_samplelimits(uint64_t samplelimits);
void set_cur_snap_samplerate(uint64_t samplerate);

View File

@ -1686,7 +1686,7 @@ void Viewport::paintMeasure(QPainter &p, QColor fore, QColor back)
measure_updated();
}
if (_action_type == LOGIC_EDGE) {
if (_action_type == LOGIC_EDGE && _view.session().have_view_data()) {
p.setPen(active_color);
p.drawLine(QLineF(_cur_preX, _cur_midY-5, _cur_preX, _cur_midY+5));
p.drawLine(QLineF(_cur_aftX, _cur_midY-5, _cur_aftX, _cur_midY+5));