From 387c5c514480c3638490a46d5220f0a83d5e1196 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 3 Jan 2017 01:33:41 +0000 Subject: [PATCH] Fix a tearing issue while dragging a new rect. Before this commit, dragging a new rect would result in one of the lines lagging behind, because it is drawn in the middle of regeneration. After this commit, the rectangle stays rectangular. For a reason I do not understand, this only fixes Win32; GTK continues to exhibit the bug, whereas Cocoa has never exhibited it but the render latency seems to have lowered slightly. --- src/draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/draw.cpp b/src/draw.cpp index 00adf7a6..2adf4f41 100644 --- a/src/draw.cpp +++ b/src/draw.cpp @@ -454,7 +454,7 @@ void GraphicsWindow::HitTestMakeSelection(Point2d mp) { if(!sel.Equals(&hover)) { hover = sel; - PaintGraphics(); + InvalidateGraphics(); } }