]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/combog.cpp
update to latest from Andrea
[wxWidgets.git] / src / generic / combog.cpp
index 1ad84ee1db6f0576b51fd7a55f2ef938f769570c..5864782b95c2730728afb0380f86035dd3206675 100644 (file)
@@ -280,11 +280,10 @@ void wxGenericComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
 
 void wxGenericComboCtrl::OnMouseEvent( wxMouseEvent& event )
 {
 
 void wxGenericComboCtrl::OnMouseEvent( wxMouseEvent& event )
 {
-    bool isOnButtonArea = m_btnArea.Contains(event.m_x,event.m_y);
+    int mx = event.m_x;
+    bool isOnButtonArea = m_btnArea.Contains(mx,event.m_y);
     int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0;
 
     int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0;
 
-    // Preprocessing fabricates double-clicks and prevents
-    // (it may also do other common things in future)
     if ( PreprocessMouseEvent(event,handlerFlags) )
         return;
 
     if ( PreprocessMouseEvent(event,handlerFlags) )
         return;
 
@@ -301,8 +300,11 @@ void wxGenericComboCtrl::OnMouseEvent( wxMouseEvent& event )
     }
     else
     {
     }
     else
     {
-        if ( isOnButtonArea || HasCapture() )
+        if ( isOnButtonArea || HasCapture() ||
+             (m_widthCustomPaint && mx < (m_tcArea.x+m_widthCustomPaint)) )
         {
         {
+            handlerFlags |= wxCC_MF_ON_CLICK_AREA;
+
             if ( HandleButtonMouseEvent(event,handlerFlags) )
                 return;
         }
             if ( HandleButtonMouseEvent(event,handlerFlags) )
                 return;
         }