From 72a69f94283842eae97ef2e4939f2a125c62bf38 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Mon, 8 Feb 2016 20:06:22 -0500 Subject: [PATCH] pcbnew asks before rotating/flipping a locked item (GAL). --- pcbnew/tools/edit_tool.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 01bdcac71b..bb4093c39b 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -429,7 +429,7 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent ) // Shall the selection be cleared at the end? bool unselect = selection.Empty(); - if( !hoverSelection( selection ) ) + if( !hoverSelection( selection ) || m_selectionTool->CheckLock() == SELECTION_LOCKED ) return 0; wxPoint rotatePoint = getModificationPoint( selection ); @@ -479,7 +479,7 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent ) // Shall the selection be cleared at the end? bool unselect = selection.Empty(); - if( !hoverSelection( selection ) ) + if( !hoverSelection( selection ) || m_selectionTool->CheckLock() == SELECTION_LOCKED ) return 0; wxPoint flipPoint = getModificationPoint( selection ); @@ -524,7 +524,7 @@ int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent ) { const SELECTION& selection = m_selectionTool->GetSelection(); - if( !hoverSelection( selection ) ) + if( !hoverSelection( selection ) || m_selectionTool->CheckLock() == SELECTION_LOCKED ) return 0; // Get a copy of the selected items set @@ -649,7 +649,7 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent ) // Shall the selection be cleared at the end? bool unselect = selection.Empty(); - if( !hoverSelection( selection ) ) + if( !hoverSelection( selection ) || m_selectionTool->CheckLock() == SELECTION_LOCKED ) return 0; wxPoint translation;