return;
}
+ disconnect(this, SLOT(on_annotation_visibility_changed()));
+
all_annotations_ = signal->get_all_annotations_by_segment(current_segment);
signal_ = signal;
+ for (const shared_ptr<Decoder>& dec : signal_->decoder_stack())
+ connect(dec.get(), SIGNAL(annotation_visibility_changed()),
+ this, SLOT(on_annotation_visibility_changed()));
+
if (hide_hidden_)
update_annotations_without_hidden();
else
theme_is_dark_ = GlobalSettings::current_theme_is_dark();
}
+void AnnotationCollectionModel::on_annotation_visibility_changed()
+{
+ if (!hide_hidden_)
+ return;
+
+ update_annotations_without_hidden();
+
+ // Re-apply the requested sample range
+ set_sample_range(start_sample_, end_sample_);
+
+ if (dataset_)
+ dataChanged(index(0, 0), index(dataset_->size(), 0));
+ else
+ dataChanged(QModelIndex(), QModelIndex());
+
+ layoutChanged();
+}
+
} // namespace tabular_decoder
} // namespace views
} // namespace pv