]> git.saurik.com Git - wxWidgets.git/commitdiff
don't reuse the double click handled in activation event handler for toggling the...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 29 Nov 2008 14:49:47 +0000 (14:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 29 Nov 2008 14:49:47 +0000 (14:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/treectrl.cpp

index 46a215d3ba926a1b0d201a76defeada6b7fcb49d..7aa4079cf659ceb0082b46044e91e83311e5ec3a 100644 (file)
@@ -2858,11 +2858,12 @@ bool wxTreeCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
     switch ( hdr->code )
     {
         case NM_DBLCLK:
-            // we translate NM_DBLCLK into ACTIVATED event, so don't interpret
-            // the return code of this event handler as the return value for
-            // NM_DBLCLK - otherwise, double clicking the item to toggle its
-            // expanded status would never work
-            *result = false;
+            // we translate NM_DBLCLK into ACTIVATED event and if the user
+            // handled the activation of the item we shouldn't proceed with
+            // also using the same double click for toggling the item expanded
+            // state -- but OTOH do let the user to expand/collapse the item by
+            // double clicking on it if the activation is not handled specially
+            *result = processed;
             break;
 
         case NM_RCLICK: