Avoid assertion failure when GtkTreeView interactive search is started.

The treeview does an unselect_all causing a "changed" signal with no selection.
The problem is easily triggered by pressing Ctrl-F (the "start-interactive-search" key binding)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-04-17 06:09:09 +00:00
parent 0554c2deaa
commit 0dd725b8a8

View File

@@ -646,7 +646,7 @@ void wxListBox::GTKOnSelectionChanged()
else // single selection
{
const int item = GetSelection();
if ( DoChangeSingleSelection(item) )
if (item >= 0 && DoChangeSingleSelection(item))
SendEvent(wxEVT_LISTBOX, item, true);
}
}