From 4e689ecdb5ddbd69da452b667aea9feb0e42c4dc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Oct 2004 22:10:35 +0000 Subject: [PATCH] update g_isPainting in wxPaintEvent copy ctor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/wx/event.h b/include/wx/event.h index 4aabe99a40..b08acfa2a7 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1089,7 +1089,15 @@ public: #endif // debug } + // default copy ctor and dtor are normally fine, we only need them to keep + // g_isPainting updated in debug build #if defined(__WXDEBUG__) && (defined(__WXMSW__) || defined(__WXPM__)) + wxPaintEvent(const wxPaintEvent& event) + : wxEvent(event) + { + g_isPainting++; + } + ~wxPaintEvent() { g_isPainting--;