X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Ftabular_decoder%2Fmodel.cpp;h=110cfd62b98d2280acea700a1ce130a50eb5f5a3;hb=49a0a40345eb84be2c953c5f83cd0c9ccada6360;hp=3733e13828afdd8b06775744cc7a8215fe05b582;hpb=6f43db70c63c683d546566eda0be7f182f614655;p=pulseview.git diff --git a/pv/views/tabular_decoder/model.cpp b/pv/views/tabular_decoder/model.cpp index 3733e138..110cfd62 100644 --- a/pv/views/tabular_decoder/model.cpp +++ b/pv/views/tabular_decoder/model.cpp @@ -213,6 +213,8 @@ int AnnotationCollectionModel::columnCount(const QModelIndex& parent_idx) const void AnnotationCollectionModel::set_signal_and_segment(data::DecodeSignal* signal, uint32_t current_segment) { + layoutAboutToBeChanged(); + if (!signal) { all_annotations_ = nullptr; dataset_ = nullptr; @@ -262,6 +264,8 @@ void AnnotationCollectionModel::set_signal_and_segment(data::DecodeSignal* signa void AnnotationCollectionModel::set_hide_hidden(bool hide_hidden) { + layoutAboutToBeChanged(); + hide_hidden_ = hide_hidden; if (hide_hidden_) { @@ -335,10 +339,8 @@ QModelIndex AnnotationCollectionModel::update_highlighted_rows(QModelIndex first } while (index != last); } - if (has_highlight || had_highlight_before_) { + if (has_highlight || had_highlight_before_) dataChanged(first, last); - layoutChanged(); - } had_highlight_before_ = has_highlight; @@ -350,6 +352,8 @@ void AnnotationCollectionModel::on_annotation_visibility_changed() if (!hide_hidden_) return; + layoutAboutToBeChanged(); + update_annotations_without_hidden(); if (dataset_)