]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/iconbndl.cpp
don't reenable the disabled windows in OnShow(), it is unnecessary and the code there...
[wxWidgets.git] / src / common / iconbndl.cpp
index 479c5dd27ccf08b3788221879a7c860970fc5dc9..ef64f80fae6d7299a178a87f962199c70788f8dc 100644 (file)
@@ -83,6 +83,8 @@ const wxIcon& wxIconBundle::GetIcon( const wxSize& size ) const
 
     for( i = 0; i < max; ++i )
     {
+        if( !m_icons[i].Ok() )
+            continue;
         wxCoord sx = m_icons[i].GetWidth(), sy = m_icons[i].GetHeight();
         // requested size
         if( sx == size.x && sy == size.y )
@@ -105,7 +107,7 @@ void wxIconBundle::AddIcon( const wxIcon& icon )
     for( i = 0; i < max; ++i )
     {
         wxIcon& tmp = m_icons[i];
-        if( tmp.GetWidth() == icon.GetWidth() &&
+        if( tmp.Ok() && tmp.GetWidth() == icon.GetWidth() &&
             tmp.GetHeight() == icon.GetHeight() )
         {
             tmp = icon;