From 87195cf3ea7ca1abd1a3721b32b766fc36ee568d Mon Sep 17 00:00:00 2001 From: jbbbms Date: Sat, 10 Nov 2018 23:37:33 +0100 Subject: [PATCH] Put wxDECLARE_EVENT_TABLE at the end of wxTextCtrl declaration This fixes the access specifier effectively used for the members following these macros, as it's changed to "public" inside them, meaning that e.g. m_privateContextMenu was actually public even though it was ostensibly declared in the private section and the intention was for it to be private. Closes #16038. --- include/wx/msw/textctrl.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 4fe3a470e6..5ef3128a7c 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -290,9 +290,6 @@ private: // false if we hit the limit set by SetMaxLength() and so didn't change it. bool AdjustSpaceLimit(); - wxDECLARE_EVENT_TABLE(); - wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl); - wxMenu* m_privateContextMenu; bool m_isNativeCaretShown; @@ -301,6 +298,8 @@ private: int m_isInkEdit; #endif + wxDECLARE_EVENT_TABLE(); + wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxTextCtrl); }; #endif // _WX_TEXTCTRL_H_