Fix the bug causing GUI tests crashes
This commit is contained in:
@@ -595,10 +595,7 @@ wxMouseEvent::wxMouseEvent(wxEventType commandType)
|
|||||||
void wxMouseEvent::Assign(const wxMouseEvent& event)
|
void wxMouseEvent::Assign(const wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
wxEvent::operator=(event);
|
wxEvent::operator=(event);
|
||||||
|
wxMouseState::operator=(event);
|
||||||
// Borland C++ 5.82 doesn't compile an explicit call to an implicitly
|
|
||||||
// defined operator=() so need to do it this way:
|
|
||||||
*static_cast<wxMouseState *>(this) = event;
|
|
||||||
|
|
||||||
m_x = event.m_x;
|
m_x = event.m_x;
|
||||||
m_y = event.m_y;
|
m_y = event.m_y;
|
||||||
@@ -804,10 +801,7 @@ wxKeyEvent& wxKeyEvent::operator=(const wxKeyEvent& evt)
|
|||||||
if ( &evt != this )
|
if ( &evt != this )
|
||||||
{
|
{
|
||||||
wxEvent::operator=(evt);
|
wxEvent::operator=(evt);
|
||||||
|
wxKeyboardState::operator=(evt);
|
||||||
// Borland C++ 5.82 doesn't compile an explicit call to an
|
|
||||||
// implicitly defined operator=() so need to do it this way:
|
|
||||||
*static_cast<wxKeyboardState *>(this) = evt;
|
|
||||||
|
|
||||||
DoAssignMembers(evt);
|
DoAssignMembers(evt);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user