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:
@@ -556,8 +556,16 @@ void wxVListBoxComboPopup::Delete( unsigned int item )
|
|||||||
if ( (int)item == m_widestItem )
|
if ( (int)item == m_widestItem )
|
||||||
m_findWidest = true;
|
m_findWidest = true;
|
||||||
|
|
||||||
|
int sel = GetSelection();
|
||||||
|
|
||||||
if ( IsCreated() )
|
if ( IsCreated() )
|
||||||
wxVListBox::SetItemCount( wxVListBox::GetItemCount()-1 );
|
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
|
int wxVListBoxComboPopup::FindString(const wxString& s, bool bCase) const
|
||||||
|
Reference in New Issue
Block a user