Fix crash bugs in picker tools.
This commit is contained in:
parent
aa4d7682ca
commit
b858fa38c4
|
@ -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 };
|
||||
|
||||
|
@ -684,7 +684,7 @@ int SCH_EDITOR_CONTROL::HighlightNetCursor( const TOOL_EVENT& aEvent )
|
|||
picker->SetCursor( wxStockCursor( wxCURSOR_BULLSEYE ) );
|
||||
|
||||
picker->SetClickHandler(
|
||||
[this]( const VECTOR2D& aPos )
|
||||
[this] ( const VECTOR2D& aPos )
|
||||
{
|
||||
return highlightNet( m_toolMgr, aPos );
|
||||
} );
|
||||
|
|
|
@ -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>();
|
||||
|
||||
|
@ -1393,7 +1393,7 @@ int PCB_EDITOR_CONTROL::LocalRatsnestTool( const TOOL_EVENT& aEvent )
|
|||
} );
|
||||
|
||||
picker->SetFinalizeHandler(
|
||||
[ board, opt ]( int aCondition )
|
||||
[board, opt] ( int aCondition )
|
||||
{
|
||||
if( aCondition != PCBNEW_PICKER_TOOL::END_ACTIVATE )
|
||||
{
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue