More lambda updates to explicit capture

This commit is contained in:
Marek Roszko 2024-04-13 15:07:54 -04:00
parent c1afade6f9
commit d7685a40ee
2 changed files with 4 additions and 4 deletions

View File

@ -196,7 +196,7 @@ void BITMAP_BUTTON::OnLeftButtonUp( wxMouseEvent& aEvent )
if( !hasFlag( wxCONTROL_DISABLED )
&& ( m_acceptDraggedInClicks || hasFlag( wxCONTROL_PRESSED | wxCONTROL_FOCUSED ) ) )
{
GetEventHandler()->CallAfter( [=]()
GetEventHandler()->CallAfter( [this]()
{
wxCommandEvent evt( wxEVT_BUTTON, GetId() );
evt.SetEventObject( this );
@ -220,7 +220,7 @@ void BITMAP_BUTTON::OnLeftButtonDown( wxMouseEvent& aEvent )
clearFlag( wxCONTROL_CHECKED );
GetEventHandler()->CallAfter(
[=]()
[this]()
{
wxCommandEvent evt( wxEVT_BUTTON, GetId() );
evt.SetEventObject( this );
@ -233,7 +233,7 @@ void BITMAP_BUTTON::OnLeftButtonDown( wxMouseEvent& aEvent )
setFlag( wxCONTROL_CHECKED );
GetEventHandler()->CallAfter(
[=]()
[this]()
{
wxCommandEvent evt( wxEVT_BUTTON, GetId() );
evt.SetEventObject( this );

View File

@ -160,7 +160,7 @@ void GRID_CELL_COLOR_SELECTOR::BeginEdit( int row, int col, wxGrid* grid )
m_value.SetFromWxString( grid->GetTable()->GetValue( row, col ) );
grid->CallAfter(
[=]()
[this, row, col]()
{
DIALOG_COLOR_PICKER dialog( m_parent, m_value, false );