Allow returning NULL windows from GetCompositeWindowParts().
wxCompositeWindow::GetCompositeWindowParts() becomes simpler to implement in the derived classes with optionally shown elements if NULL windows are allowed (and ignored) in the list returned by it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -110,6 +110,10 @@ private:
 | 
			
		||||
        {
 | 
			
		||||
            wxWindow * const child = *i;
 | 
			
		||||
 | 
			
		||||
            // Allow NULL elements in the list, this makes the code of derived
 | 
			
		||||
            // composite controls which may have optionally shown children
 | 
			
		||||
            // simpler and it doesn't cost us much here.
 | 
			
		||||
            if ( child )
 | 
			
		||||
                (child->*func)(arg);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -385,9 +385,7 @@ wxSize wxDatePickerCtrlGeneric::DoGetBestSize() const
 | 
			
		||||
wxWindowList wxDatePickerCtrlGeneric::GetCompositeWindowParts() const
 | 
			
		||||
{
 | 
			
		||||
    wxWindowList parts;
 | 
			
		||||
    if (m_combo)
 | 
			
		||||
    parts.push_back(m_combo);
 | 
			
		||||
    if (m_popup)
 | 
			
		||||
    parts.push_back(m_popup);
 | 
			
		||||
    return parts;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user