corrected MacSetSelection which was incorrectly deselecting also the previously selected line when using multiselect

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2001-11-18 18:14:07 +00:00
parent 8e72b8b517
commit f47db8f067
2 changed files with 10 additions and 4 deletions

View File

@@ -663,9 +663,12 @@ void wxListBox::MacClear()
void wxListBox::MacSetSelection( int n , bool select )
{
Cell cell = { 0 , 0 } ;
if ( LGetSelect( true , &cell , m_macList ) )
if ( ! (m_windowStyle & wxLB_MULTIPLE) )
{
LSetSelect( false , cell , m_macList ) ;
if ( LGetSelect( true , &cell , m_macList ) )
{
LSetSelect( false , cell , m_macList ) ;
}
}
cell.v = n ;

View File

@@ -663,9 +663,12 @@ void wxListBox::MacClear()
void wxListBox::MacSetSelection( int n , bool select )
{
Cell cell = { 0 , 0 } ;
if ( LGetSelect( true , &cell , m_macList ) )
if ( ! (m_windowStyle & wxLB_MULTIPLE) )
{
LSetSelect( false , cell , m_macList ) ;
if ( LGetSelect( true , &cell , m_macList ) )
{
LSetSelect( false , cell , m_macList ) ;
}
}
cell.v = n ;