]> git.saurik.com Git - wxWidgets.git/commitdiff
don't reserve space in the header for the column image if there is none (patch 1225522)
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 28 Jul 2005 23:01:36 +0000 (23:01 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 28 Jul 2005 23:01:36 +0000 (23:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
src/msw/listctrl.cpp

index 1a9d7c45126c6f3f621728c313b237fc20a1086a..f69f4b42f3c59f951dfe2755f39d5b19a89cd478 100644 (file)
@@ -27,6 +27,7 @@ wxMSW:
 - Fixed wxSlider::GetSelEnd() (Atilim Cetin).
 - Fixed accelerators of menu items added to already attached submenus.
 - Position of wxEVT_MOUSEWHEEL events is now in client, not screen, coordinates.
+- Handle absence of wxListCtrl column image better (Zbigniew Zagórski)
 
 wxWinCE:
 
index 578af99fef7253bc69e59507d9b54b271920779e..c371406b3e43277c3c43c812185ecea269972af0 100644 (file)
@@ -2828,7 +2828,8 @@ static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
             //
             // we don't use LVCFMT_COL_HAS_IMAGES because it doesn't seem to
             // make any difference in my tests -- but maybe we should?
-            lvCol.fmt |= LVCFMT_BITMAP_ON_RIGHT | LVCFMT_IMAGE;
+            if ( item.m_image != -1 )
+                lvCol.fmt |= LVCFMT_BITMAP_ON_RIGHT | LVCFMT_IMAGE;
 
             lvCol.iImage = item.m_image;
         }