fixing Life demo for OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
bdc5c6e628
commit
03275cc759
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user