]> git.saurik.com Git - wxWidgets.git/commitdiff
don't reserve space for the icons if none are used, even if we're in icon view (close...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 May 2008 00:36:48 +0000 (00:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 22 May 2008 00:36:48 +0000 (00:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index eb553e13284246cc89ac8fee169697e7ff3453a5..7bb81d14919c2f776d56678db576473388cf0da5 100644 (file)
@@ -4189,9 +4189,9 @@ void wxListMainWindow::RecalculatePositions(bool noRefresh)
     const size_t count = GetItemCount();
 
     int iconSpacing;
-    if ( HasFlag(wxLC_ICON) )
+    if ( HasFlag(wxLC_ICON) && m_normal_image_list )
         iconSpacing = m_normal_spacing;
-    else if ( HasFlag(wxLC_SMALL_ICON) )
+    else if ( HasFlag(wxLC_SMALL_ICON) && m_small_image_list )
         iconSpacing = m_small_spacing;
     else
         iconSpacing = 0;