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/trunk@76361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2014-04-17 06:09:09 +00:00
parent e81c3f87e3
commit c60cef10bc

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);
}
}