From 03275cc75922c770c1633b25b4ea8c9198d6bed2 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 25 Jul 2014 13:45:23 +0000 Subject: [PATCH] fixing Life demo for OSX git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/life/life.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/demos/life/life.cpp b/demos/life/life.cpp index 157f7a9b66..de01eb0116 100644 --- a/demos/life/life.cpp +++ b/demos/life/life.cpp @@ -794,6 +794,10 @@ void LifeCanvas::DrawCell(wxInt32 i, wxInt32 j, wxDC &dc) // draw all changed cells void LifeCanvas::DrawChanged() { +#ifdef __WXOSX__ + // we should not do out of band redraws on OSX, let things happen in the event loop + Refresh(); +#else wxClientDC dc(this); size_t ncells; @@ -824,6 +828,7 @@ void LifeCanvas::DrawChanged() for (size_t m = 0; m < ncells; m++) DrawCell(cells[m].i, cells[m].j, dc); } +#endif } // event handlers