projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixes potential crash under gatekeeper
[wxWidgets.git]
/
samples
/
erase
/
erase.cpp
diff --git
a/samples/erase/erase.cpp
b/samples/erase/erase.cpp
index 307f639df9cf1a425551c1cc727a2a3798b71a0b..37fc81bb8870ddcdf4a444b02bde67e89b951343 100644
(file)
--- a/
samples/erase/erase.cpp
+++ b/
samples/erase/erase.cpp
@@
-362,6
+362,8
@@
MyCanvas::MyCanvas(wxFrame *parent)
void MyCanvas::DoPaint(wxDC& dc)
{
void MyCanvas::DoPaint(wxDC& dc)
{
+ PrepareDC(dc);
+
if ( m_eraseBgInPaint )
{
dc.SetBackground(*wxLIGHT_GREY);
if ( m_eraseBgInPaint )
{
dc.SetBackground(*wxLIGHT_GREY);
@@
-391,15
+393,11
@@
void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
if ( m_useBuffer )
{
wxAutoBufferedPaintDC dc(this);
if ( m_useBuffer )
{
wxAutoBufferedPaintDC dc(this);
- PrepareDC(dc);
-
DoPaint(dc);
}
else
{
wxPaintDC dc(this);
DoPaint(dc);
}
else
{
wxPaintDC dc(this);
- PrepareDC(dc);
-
DoPaint(dc);
}
}
DoPaint(dc);
}
}