Pass aEvent by value.
It will have changed by the time CallAfter() is executed. Fixes https://gitlab.com/kicad/code/kicad/issues/12475
This commit is contained in:
parent
6931252ed9
commit
ff8fae377c
|
@ -70,7 +70,7 @@ void SEARCH_PANE_LISTVIEW::GetSelectRowsList( std::vector<long>& aSelectedList )
|
||||||
void SEARCH_PANE_LISTVIEW::OnItemActivated( wxListEvent& aEvent )
|
void SEARCH_PANE_LISTVIEW::OnItemActivated( wxListEvent& aEvent )
|
||||||
{
|
{
|
||||||
CallAfter(
|
CallAfter(
|
||||||
[&]()
|
[=]()
|
||||||
{
|
{
|
||||||
m_handler->ActivateItem( aEvent.GetIndex() );
|
m_handler->ActivateItem( aEvent.GetIndex() );
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ void SEARCH_PANE_LISTVIEW::OnItemActivated( wxListEvent& aEvent )
|
||||||
void SEARCH_PANE_LISTVIEW::OnItemSelected( wxListEvent& aEvent )
|
void SEARCH_PANE_LISTVIEW::OnItemSelected( wxListEvent& aEvent )
|
||||||
{
|
{
|
||||||
CallAfter(
|
CallAfter(
|
||||||
[&]()
|
[=]()
|
||||||
{
|
{
|
||||||
std::vector<long> list;
|
std::vector<long> list;
|
||||||
GetSelectRowsList( list );
|
GetSelectRowsList( list );
|
||||||
|
@ -101,7 +101,7 @@ void SEARCH_PANE_LISTVIEW::OnItemSelected( wxListEvent& aEvent )
|
||||||
void SEARCH_PANE_LISTVIEW::OnItemDeselected( wxListEvent& aEvent )
|
void SEARCH_PANE_LISTVIEW::OnItemDeselected( wxListEvent& aEvent )
|
||||||
{
|
{
|
||||||
CallAfter(
|
CallAfter(
|
||||||
[&]()
|
[=]()
|
||||||
{
|
{
|
||||||
std::vector<long> list;
|
std::vector<long> list;
|
||||||
GetSelectRowsList( list );
|
GetSelectRowsList( list );
|
||||||
|
|
Loading…
Reference in New Issue