X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/222ed1d678dff2f5c3c4164321dd05e8f47de487..2da2f941bbd25599c2c1453204b5f1a4e116ae91:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 6cc620cf4f..0b883ad106 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -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())