]> sigrok.org Git - pulseview.git/blobdiff - pv/data/decode/annotation.cpp
TabularDecView: Make the model/view work
[pulseview.git] / pv / data / decode / annotation.cpp
index 8ac8d5f9e4970e193771cffe107c414da73f077a..689c08dec6eaf16a1ba9a52acc259fd38c30f36e 100644 (file)
@@ -86,8 +86,7 @@ Annotation& Annotation::operator=(Annotation&& a)
 
 Annotation::~Annotation()
 {
-       if (annotations_)
-               delete annotations_;
+       delete annotations_;
 }
 
 uint64_t Annotation::start_sample() const
@@ -118,6 +117,11 @@ const vector<QString>* Annotation::annotations() const
        return annotations_;
 }
 
+const QString Annotation::longest_annotation() const
+{
+       return annotations_->front();
+}
+
 const Row* Annotation::row() const
 {
        return row_;