fixes for wxEvent and wxKeyEvent operator=()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-11-18 23:08:00 +00:00
parent 14fca7389a
commit f97500b80d

View File

@@ -372,6 +372,9 @@ public:
bool m_isCommandEvent;
private:
// normally copying the events is a bad idea, so disable this
wxEvent& operator=(const wxEvent&);
DECLARE_ABSTRACT_CLASS(wxEvent)
};
@@ -809,6 +812,24 @@ public:
virtual wxEvent *Clone() const { return new wxKeyEvent(*this); }
// we do need to copy wxKeyEvent sometimes (in wxTreeCtrl code, for
// example)
wxKeyEvent& operator=(const wxKeyEvent& evt)
{
m_x = evt.m_x;
m_y = evt.m_y;
m_keyCode = evt.m_keyCode;
m_controlDown = evt.m_controlDown;
m_shiftDown = evt.m_shiftDown;
m_altDown = evt.m_altDown;
m_metaDown = evt.m_metaDown;
m_scanCode = evt.m_scanCode;
return *this;
}
public:
wxCoord m_x, m_y;