Commit ODCombo delete selection fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
ec1e0c6634
commit
fa3ebb1221
@ -556,8 +556,16 @@ void wxVListBoxComboPopup::Delete( unsigned int item )
|
||||
if ( (int)item == m_widestItem )
|
||||
m_findWidest = true;
|
||||
|
||||
int sel = GetSelection();
|
||||
|
||||
if ( IsCreated() )
|
||||
wxVListBox::SetItemCount( wxVListBox::GetItemCount()-1 );
|
||||
|
||||
// Fix selection
|
||||
if ( (int)item < sel )
|
||||
SetSelection(sel-1);
|
||||
else if ( (int)item == sel )
|
||||
SetSelection(wxNOT_FOUND);
|
||||
}
|
||||
|
||||
int wxVListBoxComboPopup::FindString(const wxString& s, bool bCase) const
|
||||
|
Loading…
Reference in New Issue
Block a user