diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp index 67c20e9ac8..05c4e491b7 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_footprint_for_BoardEditor.cpp @@ -308,9 +308,11 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow() m_AutoPlaceCtrl->SetItemToolTip( 0, _( "Component can be freely moved and auto placed. User " "can arbitrarily select and edit component's pads." ) ); m_AutoPlaceCtrl->SetItemToolTip( 1, _( "Component can be freely moved and auto placed, but " - "its pads cannot be selected or edited." ) ); + "its pads cannot be edited." ) ); m_AutoPlaceCtrl->SetItemToolTip( 2, _( "Component is locked: it cannot be freely moved or " - "auto placed." ) ); + "auto placed, and can only be selected when the " + "\"Locked items\" checkbox is enabled in the " + "selection filter." ) ); m_CostRot90Ctrl->SetValue( m_footprint->GetPlacementCost90() ); m_CostRot180Ctrl->SetValue( m_footprint->GetPlacementCost180() ); diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 2ac7f5db76..73b6615eff 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -742,11 +742,23 @@ int EDIT_TOOL::Properties( const TOOL_EVENT& aEvent ) // Display properties dialog BOARD_ITEM* item = static_cast( selection.Front() ); - // Do not handle undo buffer, it is done by the properties dialogs - editFrame->OnEditItemRequest( item ); + // Pads on a locked footprint can be selected but not edited + if( item->Type() == PCB_PAD_T && item->GetParent() && + ( static_cast( item )->GetParent()->IsLocked() || + static_cast( item )->GetParent()->PadsLocked() ) ) + { + m_statusPopup->SetText( _( "Locked items cannot be edited" ) ); + m_statusPopup->PopupFor( 2000 ); + m_statusPopup->Move( wxGetMousePosition() + wxPoint( 20, 20 ) ); + } + else + { + // Do not handle undo buffer, it is done by the properties dialogs + editFrame->OnEditItemRequest( item ); - // Notify other tools of the changes - m_toolMgr->ProcessEvent( EVENTS::SelectedItemsModified ); + // Notify other tools of the changes + m_toolMgr->ProcessEvent( EVENTS::SelectedItemsModified ); + } } else if( selection.Size() == 0 && getView()->IsLayerVisible( LAYER_WORKSHEET ) ) { diff --git a/pcbnew/tools/point_editor.cpp b/pcbnew/tools/point_editor.cpp index 202b52ccc6..609b991ab1 100644 --- a/pcbnew/tools/point_editor.cpp +++ b/pcbnew/tools/point_editor.cpp @@ -201,7 +201,8 @@ public: wxPoint shapePos = pad->ShapePos(); wxPoint halfSize( pad->GetSize().x / 2, pad->GetSize().y / 2 ); - if( pad->GetParent() && pad->GetParent()->PadsLocked() ) + if( pad->GetParent() && + ( pad->GetParent()->IsLocked() || pad->GetParent()->PadsLocked() ) ) break; switch( pad->GetShape() ) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index 1135cefd03..ec78915d10 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -1490,12 +1490,6 @@ bool SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem ) if( !m_filter.pads ) return false; - // Parent footprint locking should apply to pads also - D_PAD* pad = static_cast( aItem ); - - if( !m_filter.lockedItems && pad->GetParent() && pad->GetParent()->IsLocked() ) - return false; - break; }