]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/listctrl.cpp
Dislaying popup tip windows seems to work right now.
[wxWidgets.git] / src / generic / listctrl.cpp
index 2fee597386e3d1c462f448747de644673204b663..38a9a92ce0a79e0273df6d6fd7a3518a85896e9a 100644 (file)
@@ -1449,8 +1449,8 @@ void wxListLineData::SetPosition( int x, int y,
 
             if ( item->HasImage() )
             {
-                m_gi->m_rectIcon.x = m_gi->m_rectAll.x + 4
-                                    + (spacing - m_gi->m_rectIcon.width)/2;
+                m_gi->m_rectIcon.x = m_gi->m_rectAll.x + 4 +
+                    (m_gi->m_rectAll.width - m_gi->m_rectIcon.width) / 2;
                 m_gi->m_rectIcon.y = m_gi->m_rectAll.y + 4;
             }
 
@@ -3772,6 +3772,14 @@ void wxListMainWindow::SetItemState( long litem, long state, long stateMask )
             {
                 ResetCurrent();
 
+                if ( IsSingleSel() )
+                {
+                    // we must unselect the old current item as well or we
+                    // might end up with more than one selected item in a
+                    // single selection control
+                    HighlightLine(oldCurrent, FALSE);
+                }
+
                 RefreshLine( oldCurrent );
             }
         }