Browse Source

More lambda updates to explicit capture

newinvert
Marek Roszko 2 years ago
parent
commit
d7685a40ee
  1. 6
      common/widgets/bitmap_button.cpp
  2. 2
      common/widgets/grid_color_swatch_helpers.cpp

6
common/widgets/bitmap_button.cpp

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

2
common/widgets/grid_color_swatch_helpers.cpp

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

Loading…
Cancel
Save