X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/050e7ed73b61d8503656297fc12799ffd0f5bbfe..ad9fb0334fbfe5747b67c09ba714c1f00bd40ff8:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 2fee597386..38a9a92ce0 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -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 ); } }