]> sigrok.org Git - pulseview.git/commitdiff
Only show sampling points when zoomed in far enough.
authorUwe Hermann <redacted>
Fri, 17 Mar 2017 22:53:49 +0000 (23:53 +0100)
committerUwe Hermann <redacted>
Fri, 17 Mar 2017 23:33:07 +0000 (00:33 +0100)
pv/view/analogsignal.cpp
pv/view/logicsignal.cpp

index 3c3e5d0571a36a896c91441fe9ef27321bd83cbe..c64d86afdf1fbcfaa45c377f8b762d6b7314ffb6 100644 (file)
@@ -309,7 +309,8 @@ void AnalogSignal::paint_trace(QPainter &p,
        GlobalSettings settings;
        const bool show_sampling_points =
                settings.value(GlobalSettings::Key_View_ShowSamplingPoints).toBool();
-       if (show_sampling_points) {
+
+       if (show_sampling_points && (samples_per_pixel < 0.25)) {
                p.setPen(SamplingPointColour);
                p.drawRects(sampling_points, points_count);
        }
index ea8fd510d9401e98324f5e0daefcc15ffb8e1614..251190ece03b789df3c568c99fdba35fe905affa 100644 (file)
@@ -234,7 +234,8 @@ void LogicSignal::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
        GlobalSettings settings;
        const bool show_sampling_points =
                settings.value(GlobalSettings::Key_View_ShowSamplingPoints).toBool();
-       if (!show_sampling_points)
+
+       if (!show_sampling_points || (samples_per_pixel >= 0.25))
                return;
 
        // Paint the sampling points