From ebbadae09a2dbf2586b6aa3503620799004d9081 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 28 Jan 2020 00:18:25 +0100 Subject: [PATCH] Double buffer wxGridWindow drawing This eliminates noticeable flicker under MSW when changing selection, for example. --- src/generic/grid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 9ef831f090..0c6349b6cc 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -42,6 +42,7 @@ #include "wx/listbox.h" #endif +#include "wx/dcbuffer.h" #include "wx/textfile.h" #include "wx/spinctrl.h" #include "wx/tokenzr.h" @@ -1911,7 +1912,7 @@ wxEND_EVENT_TABLE() void wxGridWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) { - wxPaintDC dc( this ); + wxAutoBufferedPaintDC dc( this ); m_owner->PrepareDCFor( dc, this ); wxRegion reg = GetUpdateRegion();