Reset selection in after deleting selected item from wxChoice
This commit is contained in:
committed by
Vadim Zeitlin
parent
cfdf80d586
commit
f2538a0bc4
@@ -240,6 +240,12 @@ void wxChoice::DoClear()
|
|||||||
|
|
||||||
void wxChoice::DoDeleteOneItem(unsigned int pos)
|
void wxChoice::DoDeleteOneItem(unsigned int pos)
|
||||||
{
|
{
|
||||||
|
const int selection = GetSelection();
|
||||||
|
|
||||||
|
if ( selection >= 0 && static_cast<unsigned int>(selection) == pos )
|
||||||
|
{
|
||||||
|
SetSelection( wxNOT_FOUND );
|
||||||
|
}
|
||||||
m_qtComboBox->removeItem(pos);
|
m_qtComboBox->removeItem(pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user