]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
Add some version checks to help compiling on OSX.
[wxWidgets.git] / src / msw / listctrl.cpp
index 9d49a3be1031cf23610edcbe74f15372f8ca9b0c..1e1c9a722c4ccf43c34192c48d0190df29ef7ccc 100644 (file)
@@ -1727,7 +1727,9 @@ long wxListCtrl::InsertItem(long index, const wxString& label, int imageIndex)
     wxListItem info;
     info.m_image = imageIndex;
     info.m_text = label;
     wxListItem info;
     info.m_image = imageIndex;
     info.m_text = label;
-    info.m_mask = wxLIST_MASK_IMAGE | wxLIST_MASK_TEXT;
+    info.m_mask = wxLIST_MASK_TEXT;
+    if (imageIndex > -1)
+        info.m_mask |= wxLIST_MASK_IMAGE;
     info.m_itemId = index;
     return InsertItem(info);
 }
     info.m_itemId = index;
     return InsertItem(info);
 }