The changes of r70066 improved the layout for icon and small icon modes but
broke it for the list mode if items had icons because the item width should
account for the icon as well in this case. Simply disable the code added in
this revision when in list mode, we don't need to do anything then anyhow as
the layout already worked correctly for it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70077
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
|| i == count - 1)
{
// Adjust all items in this row to have the same
- // width to ensure that they all align horizontally.
- size_t firstRowLine = i - currentlyVisibleLines + 1;
- for (size_t j = firstRowLine; j <= i; j++)
+ // width to ensure that they all align horizontally in
+ // icon view.
+ if ( HasFlag(wxLC_ICON) || HasFlag(wxLC_SMALL_ICON) )
{
- GetLine(j)->m_gi->ExtendWidth(maxWidthInThisRow);
+ size_t firstRowLine = i - currentlyVisibleLines + 1;
+ for (size_t j = firstRowLine; j <= i; j++)
+ {
+ GetLine(j)->m_gi->ExtendWidth(maxWidthInThisRow);
+ }
}
currentlyVisibleLines = 0;