pcbnew asks before rotating/flipping a locked item (GAL).

This commit is contained in:
Maciej Suminski 2016-01-05 17:01:59 +01:00
parent ed2a1d5955
commit 203e8156a1
1 changed files with 4 additions and 4 deletions

View File

@ -429,7 +429,7 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
// Shall the selection be cleared at the end? // Shall the selection be cleared at the end?
bool unselect = selection.Empty(); bool unselect = selection.Empty();
if( !hoverSelection( selection ) ) if( !hoverSelection( selection ) || m_selectionTool->CheckLock() == SELECTION_LOCKED )
return 0; return 0;
wxPoint rotatePoint = getModificationPoint( selection ); wxPoint rotatePoint = getModificationPoint( selection );
@ -479,7 +479,7 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
// Shall the selection be cleared at the end? // Shall the selection be cleared at the end?
bool unselect = selection.Empty(); bool unselect = selection.Empty();
if( !hoverSelection( selection ) ) if( !hoverSelection( selection ) || m_selectionTool->CheckLock() == SELECTION_LOCKED )
return 0; return 0;
wxPoint flipPoint = getModificationPoint( selection ); wxPoint flipPoint = getModificationPoint( selection );
@ -524,7 +524,7 @@ int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
{ {
const SELECTION& selection = m_selectionTool->GetSelection(); const SELECTION& selection = m_selectionTool->GetSelection();
if( !hoverSelection( selection ) ) if( !hoverSelection( selection ) || m_selectionTool->CheckLock() == SELECTION_LOCKED )
return 0; return 0;
// Get a copy of the selected items set // 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? // Shall the selection be cleared at the end?
bool unselect = selection.Empty(); bool unselect = selection.Empty();
if( !hoverSelection( selection ) ) if( !hoverSelection( selection ) || m_selectionTool->CheckLock() == SELECTION_LOCKED )
return 0; return 0;
wxPoint translation; wxPoint translation;