Simplify wxEVT_PAINT handling in wxScrollHelperBase.

Just always call the virtual OnDraw() if wxEVT_PAINT wasn't handled. This is
much simpler than connecting our own special handler just to set a flag saying
whether the event was processed which was very complicated and didn't work
anyhow for the statically connected wxEVT_PAINT handlers.

See #14757.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72939 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-11-10 00:53:17 +00:00
parent ddc8faa9e1
commit 4ca30c7d65
2 changed files with 15 additions and 56 deletions

View File

@@ -252,10 +252,6 @@ protected:
// delete the event handler we installed
void DeleteEvtHandler();
// calls wxScrollHelperEvtHandler::ResetDrawnFlag(), see explanation
// in wxScrollHelperEvtHandler::ProcessEvent()
void ResetDrawnFlag();
// this function should be overridden to return the size available for
// m_targetWindow inside m_win of the given size
//
@@ -376,8 +372,6 @@ public:
this->MacSetClipChildren(true);
#endif
this->Connect(wxEVT_PAINT, wxPaintEventHandler(wxScrolled::OnPaint));
// by default, we're scrollable in both directions (but if one of the
// styles is specified explicitly, we shouldn't add the other one
// automatically)
@@ -408,16 +402,6 @@ protected:
}
private:
// this is needed for wxEVT_PAINT processing hack described in
// wxScrollHelperEvtHandler::ProcessEvent()
void OnPaint(wxPaintEvent& event)
{
// the user code didn't really draw the window if we got here, so set
// this flag to try to call OnDraw() later
ResetDrawnFlag();
event.Skip();
}
// VC++ 6 gives warning for the declaration of template member function
// without definition
#ifndef __VISUALC6__