Fixed pcbnew crash when a locked footprint is dragged from an edge of the screen.
This commit is contained in:
parent
73005087d5
commit
94a46bf2df
|
@ -102,7 +102,6 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
|
||||||
PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>();
|
PCB_BASE_EDIT_FRAME* editFrame = getEditFrame<PCB_BASE_EDIT_FRAME>();
|
||||||
controls->ShowCursor( true );
|
controls->ShowCursor( true );
|
||||||
controls->SetSnapping( true );
|
controls->SetSnapping( true );
|
||||||
controls->SetAutoPan( true );
|
|
||||||
controls->ForceCursorPosition( false );
|
controls->ForceCursorPosition( false );
|
||||||
|
|
||||||
// Main loop: keep receiving events
|
// Main loop: keep receiving events
|
||||||
|
@ -159,7 +158,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
|
||||||
}
|
}
|
||||||
else // Prepare to start dragging
|
else // Prepare to start dragging
|
||||||
{
|
{
|
||||||
if( m_selectionTool->CheckLock() )
|
if( m_selectionTool->CheckLock() || selection.Empty() )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Save items, so changes can be undone
|
// Save items, so changes can be undone
|
||||||
|
@ -188,6 +187,7 @@ int EDIT_TOOL::Main( TOOL_EVENT& aEvent )
|
||||||
wxPoint( origin.x, origin.y );
|
wxPoint( origin.x, origin.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
controls->SetAutoPan( true );
|
||||||
m_dragging = true;
|
m_dragging = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue