X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fview%2Fview.cpp;h=35195b58dc150c8743f5d623e7495ccb1ecd5412;hb=a472a884a9d2d17eb31a8a02322608fe7d71e8a3;hp=a437918d9f2a88f3001f35ae9eb33b854530924c;hpb=1f81a39462d07950600033c70e3819805ac40dd3;p=pulseview.git diff --git a/pv/view/view.cpp b/pv/view/view.cpp index a437918..35195b5 100644 --- a/pv/view/view.cpp +++ b/pv/view/view.cpp @@ -286,9 +286,12 @@ pair View::get_time_extents() const BOOST_FOREACH(const shared_ptr d, visible_data) { const double start_time = d->get_start_time(); + double samplerate = d->samplerate(); + samplerate = (samplerate <= 0.0) ? 1.0 : samplerate; + left_time = min(left_time, start_time); right_time = max(right_time, start_time + - d->get_max_sample_count() / d->samplerate()); + d->get_max_sample_count() / samplerate); } assert(left_time < right_time);