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:
@@ -646,7 +646,7 @@ void wxListBox::GTKOnSelectionChanged()
|
|||||||
else // single selection
|
else // single selection
|
||||||
{
|
{
|
||||||
const int item = GetSelection();
|
const int item = GetSelection();
|
||||||
if ( DoChangeSingleSelection(item) )
|
if (item >= 0 && DoChangeSingleSelection(item))
|
||||||
SendEvent(wxEVT_LISTBOX, item, true);
|
SendEvent(wxEVT_LISTBOX, item, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user