1. wxMDIParentFrame::~wxMDIParentFrame() bug fixed
2. tooltips work with wxRadioBox 3. duplicated OnCtlColor()s moved to wxControl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -163,6 +163,17 @@ END_EVENT_TABLE()
|
||||
// Find an item given the MS Windows id
|
||||
wxWindow *wxWindow::FindItem(long id) const
|
||||
{
|
||||
wxControl *item = wxDynamicCast(this, wxControl);
|
||||
if ( item )
|
||||
{
|
||||
// i it we or one of our "internal" children?
|
||||
if ( item->GetId() == id ||
|
||||
(item->GetSubcontrols().Index(id) != wxNOT_FOUND) )
|
||||
{
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
wxWindowList::Node *current = GetChildren().GetFirst();
|
||||
while (current)
|
||||
{
|
||||
@@ -172,19 +183,6 @@ wxWindow *wxWindow::FindItem(long id) const
|
||||
if ( wnd )
|
||||
return wnd;
|
||||
|
||||
if ( childWin->IsKindOf(CLASSINFO(wxControl)) )
|
||||
{
|
||||
wxControl *item = (wxControl *)childWin;
|
||||
if ( item->GetId() == id )
|
||||
return item;
|
||||
else
|
||||
{
|
||||
// In case it's a 'virtual' control (e.g. radiobox)
|
||||
if ( item->GetSubcontrols().Member((wxObject *)id) )
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
current = current->GetNext();
|
||||
}
|
||||
|
||||
@@ -2946,7 +2944,8 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||
return popupMenu->MSWCommand(cmd, id);
|
||||
}
|
||||
|
||||
wxWindow *win = FindItem(id);
|
||||
// must cast to a signed type before comparing with other ids!
|
||||
wxWindow *win = FindItem((signed short)id);
|
||||
if ( !win )
|
||||
{
|
||||
win = wxFindWinFromHandle(control);
|
||||
|
Reference in New Issue
Block a user