]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
Ensure that wxSplashScreen doesn't appear on taskbar nor in Alt-TAB list.
[wxWidgets.git] / src / generic / listctrl.cpp
index bcf799a00be753f2bc56d1d6ab03cf6623f32316..5d4767f939cb1c75381d8fcd2cffaae1ffa8fa4c 100644 (file)
@@ -4030,11 +4030,11 @@ void wxListMainWindow::InsertItem( wxListItem &item )
     if ( item.m_mask & wxLIST_MASK_IMAGE )
     {
         // Reset the buffered height if it's not big enough for the new image.
-        if (m_small_image_list)
+        int image = item.GetImage();
+        if ( m_small_image_list && image != -1 && InReportView() )
         {
             int imageWidth, imageHeight;
-            m_small_image_list->GetSize(item.GetImage(),
-                                        imageWidth, imageHeight);
+            m_small_image_list->GetSize(image, imageWidth, imageHeight);
 
             if ( imageHeight > m_lineHeight )
                 m_lineHeight = 0;
@@ -4866,7 +4866,9 @@ long wxGenericListCtrl::InsertItem( long index, const wxString &label, int image
     wxListItem info;
     info.m_text = label;
     info.m_image = imageIndex;
-    info.m_mask = wxLIST_MASK_TEXT | wxLIST_MASK_IMAGE;
+    info.m_mask = wxLIST_MASK_TEXT;
+    if (imageIndex > -1)
+        info.m_mask |= wxLIST_MASK_IMAGE;
     info.m_itemId = index;
     return InsertItem( info );
 }