+ if ( e->message & EVT_DBLCLICK )
+ {
+ // MGL doesn't generate two subsequent single clicks prior
+ // to a double click, but rather only fires one single click
+ // followed by one double click. wxWindows expects two single
+ // clicks, so we have to emulate the second one.
+ event.SetEventType(type);
+ win->GetEventHandler()->ProcessEvent(event);
+
+ // And change event type for the real double click event
+ // that will be generated later in this function:
+ if ( e->message & EVT_LEFTBMASK )
+ type = wxEVT_LEFT_DCLICK;
+ else if ( e->message & EVT_MIDDLEBMASK )
+ type = wxEVT_MIDDLE_DCLICK;
+ else if ( e->message & EVT_RIGHTBMASK )
+ type = wxEVT_RIGHT_DCLICK;
+ }