Make sure get_time_extents() uses a signal that data was acquired for
authorSoeren Apel <soeren@apelpie.net>
Fri, 22 May 2020 22:05:12 +0000 (00:05 +0200)
committerSoeren Apel <soeren@apelpie.net>
Sat, 23 May 2020 17:05:26 +0000 (19:05 +0200)
pv/views/trace/view.cpp

index cfafdc082ca6dc4d439c034a2e3b3a39a08faadd..df58967523e2e692b9b64b60df0a2564f10cc2ad 100644 (file)
@@ -928,7 +928,9 @@ pair<Timestamp, Timestamp> View::get_time_extents() const
        if (signals_.size() == 0)
                return make_pair(0, 0);
 
-       data.push_back(signals_.front()->data());
+       for (shared_ptr<Signal> s : signals_)
+               if (s->data()->segments().size() > 0)
+                       data.push_back(s->data());
 
        for (const shared_ptr<SignalData>& d : data) {
                const vector< shared_ptr<Segment> > segments = d->segments();