EDIT_TOOL: correctly handle locked items in Rotate/Flip/Mirror functions when the selection is already being dragged
Fixes: lp:1812009 * https://bugs.launchpad.net/kicad/+bug/1812009
This commit is contained in:
parent
f9f87b3ff8
commit
d50bc6a85f
|
@ -672,7 +672,7 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
|
|||
|
||||
auto& selection = m_selectionTool->RequestSelection(
|
||||
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector )
|
||||
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED | EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); } );
|
||||
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); }, nullptr, ! m_dragging );
|
||||
|
||||
if( selection.Empty() )
|
||||
return 0;
|
||||
|
@ -751,7 +751,7 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
auto& selection = m_selectionTool->RequestSelection(
|
||||
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector )
|
||||
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED | EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); } );
|
||||
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); }, nullptr, ! m_dragging );
|
||||
|
||||
if( selection.Empty() )
|
||||
return 0;
|
||||
|
@ -833,7 +833,7 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
auto& selection = m_selectionTool->RequestSelection(
|
||||
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector )
|
||||
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED | EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); } );
|
||||
{ EditToolSelectionFilter( aCollector, EXCLUDE_LOCKED_PADS | EXCLUDE_TRANSIENTS ); }, nullptr, ! m_dragging );
|
||||
|
||||
if( selection.Empty() )
|
||||
return 0;
|
||||
|
|
|
@ -396,7 +396,7 @@ static EDA_RECT getRect( const BOARD_ITEM* aItem )
|
|||
|
||||
|
||||
SELECTION& SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aClientFilter,
|
||||
std::vector<BOARD_ITEM*>* aFiltered )
|
||||
std::vector<BOARD_ITEM*>* aFiltered, bool aConfirmLockedItems )
|
||||
{
|
||||
bool selectionEmpty = m_selection.Empty();
|
||||
m_selection.SetIsHover( selectionEmpty );
|
||||
|
@ -406,7 +406,13 @@ SELECTION& SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aClientFilt
|
|||
m_toolMgr->RunAction( PCB_ACTIONS::selectionCursor, true, aClientFilter );
|
||||
m_selection.ClearReferencePoint();
|
||||
}
|
||||
else if( aClientFilter )
|
||||
|
||||
if ( aConfirmLockedItems && CheckLock() == SELECTION_LOCKED )
|
||||
{
|
||||
clearSelection();
|
||||
}
|
||||
|
||||
if( aClientFilter )
|
||||
{
|
||||
GENERAL_COLLECTOR collector;
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ public:
|
|||
* @param aFiltered is an optional vector, that is filled with items removed by the filter
|
||||
*/
|
||||
SELECTION& RequestSelection( CLIENT_SELECTION_FILTER aClientFilter,
|
||||
std::vector<BOARD_ITEM*>* aFiltered = NULL );
|
||||
std::vector<BOARD_ITEM*>* aFiltered = NULL, bool aConfirmLockedItems = false );
|
||||
|
||||
|
||||
inline TOOL_MENU& GetToolMenu()
|
||||
|
|
Loading…
Reference in New Issue