]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/odcombo.cpp
Fix install_name_tool calls in OS X "make install".
[wxWidgets.git] / src / generic / odcombo.cpp
index 98a30b8f86a3c7272c02b73390b8d54be55f66a1..d48bf5a085b69d8dc15a5f4dcc0e4fdc7cd1ebea 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     Apr-30-2006
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     Apr-30-2006
-// RCS-ID:      $Id$
 // Copyright:   (c) 2005 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 2005 Jaakko Salli
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -1175,18 +1174,14 @@ wxCoord wxOwnerDrawnComboBox::OnMeasureItemWidth( size_t WXUNUSED(item) ) const
 
 wxSize wxOwnerDrawnComboBox::DoGetBestSize() const
 {
 
 wxSize wxOwnerDrawnComboBox::DoGetBestSize() const
 {
-    wxSize best( wxComboCtrlBase::DoGetBestSize() );
+    if ( GetCount() == 0 )
+        return wxComboCtrlBase::DoGetBestSize();
 
 
-    if ( GetCount() > 0 )
-    {
-        wxOwnerDrawnComboBox* odc = const_cast<wxOwnerDrawnComboBox*>(this);
-        best.x = odc->GetWidestItemWidth();
-        // TODO: this class may also have GetHightestItemHeight() and
-        // GetHightestItem() methods, and so set the whole (edit part + arrow)
-        // control's height according with this max height, not only max width.
-    }
-
-    return GetSizeFromTextSize(best.x);
+    wxOwnerDrawnComboBox* odc = const_cast<wxOwnerDrawnComboBox*>(this);
+    // TODO: this class may also have GetHightestItemHeight() and
+    // GetHightestItem() methods, and so set the whole (edit part + arrow)
+    // control's height according with this max height, not only max width.
+    return GetSizeFromTextSize(odc->GetWidestItemWidth());
 }
 
 void wxOwnerDrawnComboBox::OnDrawBackground(wxDC& dc,
 }
 
 void wxOwnerDrawnComboBox::OnDrawBackground(wxDC& dc,