Fix crash bugs in picker tools.

This commit is contained in:
Jeff Young 2019-07-21 19:06:06 -06:00
parent aa4d7682ca
commit b858fa38c4
3 changed files with 9 additions and 9 deletions

View File

@ -444,7 +444,7 @@ int SCH_EDITOR_CONTROL::SimProbe( const TOOL_EVENT& aEvent )
picker->SetCursor( SIMULATION_CURSORS::GetCursor( SIMULATION_CURSORS::CURSOR::PROBE ) );
picker->SetClickHandler(
[&]( const VECTOR2D& aPosition )
[this] ( const VECTOR2D& aPosition )
{
KICAD_T wiresAndComponents[] = { SCH_LINE_T, SCH_COMPONENT_T, SCH_SHEET_PIN_T, EOT };
@ -490,7 +490,7 @@ int SCH_EDITOR_CONTROL::SimTune( const TOOL_EVENT& aEvent )
picker->SetCursor( SIMULATION_CURSORS::GetCursor( SIMULATION_CURSORS::CURSOR::TUNE ) );
picker->SetClickHandler(
[&]( const VECTOR2D& aPosition )
[this] ( const VECTOR2D& aPosition )
{
KICAD_T fieldsAndComponents[] = { SCH_COMPONENT_T, SCH_FIELD_T, EOT };

View File

@ -1345,7 +1345,7 @@ int PCB_EDITOR_CONTROL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
Activate();
picker->SetClickHandler(
[&] ( const VECTOR2D& pt ) -> bool
[this, board, opt]( const VECTOR2D& pt ) -> bool
{
SELECTION_TOOL* selectionTool = m_toolMgr->GetTool<SELECTION_TOOL>();

View File

@ -552,7 +552,7 @@ int PCBNEW_CONTROL::DeleteItemCursor( const TOOL_EVENT& aEvent )
} );
picker->SetFinalizeHandler(
[&]( const int& aFinalState )
[this] ( const int& aFinalState )
{
if( m_pickerItem )
m_toolMgr->GetTool<SELECTION_TOOL>()->UnbrightenItem( m_pickerItem );