From: Uwe Hermann Date: Fri, 17 Mar 2017 22:53:49 +0000 (+0100) Subject: Only show sampling points when zoomed in far enough. X-Git-Tag: pulseview-0.4.0~144 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=00f6bae935837b38b0d03a5928ba8175d460413f;p=pulseview.git Only show sampling points when zoomed in far enough. --- diff --git a/pv/view/analogsignal.cpp b/pv/view/analogsignal.cpp index 3c3e5d05..c64d86af 100644 --- a/pv/view/analogsignal.cpp +++ b/pv/view/analogsignal.cpp @@ -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); } diff --git a/pv/view/logicsignal.cpp b/pv/view/logicsignal.cpp index ea8fd510..251190ec 100644 --- a/pv/view/logicsignal.cpp +++ b/pv/view/logicsignal.cpp @@ -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