Disable antialiasing on high-DPI displays
[pulseview.git] / pv / views / trace / analogsignal.cpp
index d9b72ad..5992464 100644 (file)
@@ -319,6 +319,7 @@ void AnalogSignal::paint_fore(QPainter &p, ViewItemPaintParams &pp)
 
 void AnalogSignal::paint_grid(QPainter &p, int y, int left, int right)
 {
+       bool wasAntialiased = p.testRenderHint(QPainter::Antialiasing);
        p.setRenderHint(QPainter::Antialiasing, false);
 
        if (pos_vdivs_ > 0) {
@@ -363,7 +364,7 @@ void AnalogSignal::paint_grid(QPainter &p, int y, int left, int right)
                }
        }
 
-       p.setRenderHint(QPainter::Antialiasing, true);
+       p.setRenderHint(QPainter::Antialiasing, wasAntialiased);
 }
 
 void AnalogSignal::paint_trace(QPainter &p,