]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Fix wx[Sorted]ArrayString::Index when wxUSE_STL=1, because
[wxWidgets.git] / src / common / wincmn.cpp
index 6cc620cf4faaaf6c6aa3a2f240e7ad6840ffca2a..0b883ad1069c014bd2167016beb68a3039526c42 100644 (file)
@@ -1830,7 +1830,9 @@ void wxWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
 #endif
 }
 
+#if 0
 // call internal idle recursively
+// may be obsolete (wait until OnIdle scheme stabilises)
 void wxWindowBase::ProcessInternalIdle()
 {
     OnInternalIdle();
@@ -1843,6 +1845,7 @@ void wxWindowBase::ProcessInternalIdle()
         node = node->GetNext();
     }
 }
+#endif
 
 // ----------------------------------------------------------------------------
 // dialog units translations
@@ -2160,10 +2163,9 @@ bool wxWindowBase::TryValidator(wxEvent& event)
 
 bool wxWindowBase::TryParent(wxEvent& event)
 {
-    // Carry on up the parent-child hierarchy, but only if event is a command
-    // event: it wouldn't make sense for a parent to receive a child's size
-    // event, for example
-    if ( event.IsCommandEvent() )
+    // carry on up the parent-child hierarchy if the propgation count hasn't
+    // reached zero yet
+    if ( event.ShouldPropagate() )
     {
         // honour the requests to stop propagation at this window: this is
         // used by the dialogs, for example, to prevent processing the events
@@ -2173,7 +2175,11 @@ bool wxWindowBase::TryParent(wxEvent& event)
         {
             wxWindow *parent = GetParent();
             if ( parent && !parent->IsBeingDeleted() )
+            {
+                wxPropagateOnce propagateOnce(event);
+
                 return parent->GetEventHandler()->ProcessEvent(event);
+            }
         }
     }
 
@@ -2285,7 +2291,7 @@ wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId,
             else
             {
                 if (fromId <= (int) GetWindow()->GetChildren().GetCount())
-                    node = GetWindow()->GetChildren().Nth(fromId-1);
+                    node = GetWindow()->GetChildren().Item(fromId-1);
             }
 
             if (node && node->GetNext())
@@ -2314,7 +2320,7 @@ wxAccStatus wxWindowAccessible::Navigate(wxNavDir navDir, int fromId,
             else
             {
                 if (fromId <= (int) GetWindow()->GetChildren().GetCount())
-                    node = GetWindow()->GetChildren().Nth(fromId-1);
+                    node = GetWindow()->GetChildren().Item(fromId-1);
             }
 
             if (node && node->GetPrevious())