Browse Source

Pass aEvent by value.

It will have changed by the time CallAfter() is executed.

Fixes https://gitlab.com/kicad/code/kicad/issues/12475
newinvert
Jeff Young 3 years ago
parent
commit
7eb099187d
  1. 6
      common/widgets/search_pane_tab.cpp

6
common/widgets/search_pane_tab.cpp

@ -70,7 +70,7 @@ void SEARCH_PANE_LISTVIEW::GetSelectRowsList( std::vector<long>& aSelectedList )
void SEARCH_PANE_LISTVIEW::OnItemActivated( wxListEvent& aEvent )
{
CallAfter(
[&]()
[=]()
{
m_handler->ActivateItem( aEvent.GetIndex() );
@ -87,7 +87,7 @@ void SEARCH_PANE_LISTVIEW::OnItemActivated( wxListEvent& aEvent )
void SEARCH_PANE_LISTVIEW::OnItemSelected( wxListEvent& aEvent )
{
CallAfter(
[&]()
[=]()
{
std::vector<long> list;
GetSelectRowsList( list );
@ -101,7 +101,7 @@ void SEARCH_PANE_LISTVIEW::OnItemSelected( wxListEvent& aEvent )
void SEARCH_PANE_LISTVIEW::OnItemDeselected( wxListEvent& aEvent )
{
CallAfter(
[&]()
[=]()
{
std::vector<long> list;
GetSelectRowsList( list );

Loading…
Cancel
Save