From e3959a350e0e6e6a9b13bbec9133e37c42256389 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 23 Aug 2008 17:53:37 +0000 Subject: [PATCH] don't reserve space for the icons if none are used, even if we're in icon view (#9472) [backport from trunk] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55208 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/listctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 77d3ef7aec..5d0a1fbda8 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -4227,9 +4227,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;