64 wxString check = board->GroupsSanityCheck();
65 wxCHECK_RET( check == wxEmptyString,
_(
"Group is in inconsistent state:" ) + wxS(
" " )+ check );
80 m_propertiesDialog( nullptr ),
81 m_selectionTool( nullptr )
88 m_frame = getEditFrame<PCB_BASE_EDIT_FRAME>();
91 m_commit = std::make_unique<BOARD_COMMIT>(
this );
97 m_frame = getEditFrame<PCB_BASE_EDIT_FRAME>();
102 std::shared_ptr<GROUP_CONTEXT_MENU> groupMenu = std::make_shared<GROUP_CONTEXT_MENU>();
103 groupMenu->SetTool(
this );
138 std::string tool =
"pcbnew.EditGroups.selectNewMember";
148 statusPopup.SetText(
_(
"Click on new member..." ) );
151 [&](
const VECTOR2D& aPoint ) ->
bool 178 statusPopup.Move( wxGetMousePosition() + wxPoint( 20, -50 ) );
191 [&](
const int& aFinalState )
196 statusPopup.Move( wxGetMousePosition() + wxPoint( 20, -50 ) );
232 for(
int i = aCollector.
GetCount() - 1; i >= 0; --i )
236 switch( item->
Type() )
242 aCollector.
Remove( item );
257 bool lockGroup =
false;
270 BOARD_ITEM* item = static_cast<BOARD_ITEM*>( eda_item );
275 group->AddItem( item );
289 BOARD_ITEM* item = static_cast<BOARD_ITEM*>( eda_item );
294 group->AddItem( static_cast<BOARD_ITEM*>( item ) );
303 group->SetLocked(
true );
319 std::vector<BOARD_ITEM*> members;
349 members.push_back( member );
360 group->SetSelected();
382 std::map<PCB_GROUP*, std::vector<BOARD_ITEM*>> groupMap;
386 BOARD_ITEM* boardItem = static_cast<BOARD_ITEM*>( item );
390 groupMap[
group ].push_back( boardItem );
393 for( std::pair<
PCB_GROUP*, std::vector<BOARD_ITEM*>> pair : groupMap )
395 commit.
Modify( pair.first );
398 pair.first->RemoveItem( item );
401 commit.
Push( wxT(
"Remove Group Items" ) );
static TOOL_ACTION selectItems
Select a list of items (specified as the event parameter)
static TOOL_ACTION selectionClear
Clear the current selection.
PCB_GROUP * GetParentGroup() const
COMMIT & Modify(EDA_ITEM *aItem)
Create an undo entry for an item that has been already modified.
static TOOL_ACTION groupLeave
class FP_TEXT, text in a footprint
void SaveCopyInUndoList(EDA_ITEM *aItemToCopy, UNDO_REDO aTypeCommand) override
Create a new entry in undo list of commands.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
class PCB_GROUP, a set of BOARD_ITEMs
A set of BOARD_ITEMs (i.e., without duplicates).
void PushItem(const ITEM_PICKER &aItem)
Push aItem to the top of the list.
class FP_SHAPE, a footprint edge
class PAD, a pad in a footprint
static TOOL_ACTION ungroup
virtual bool IsLocked() const
static bool NotEmpty(const SELECTION &aSelection)
Test if there are any items selected.
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
static TOOL_ACTION pickerTool
int GetCount() const
Return the number of objects in the list.
static TOOL_ACTION removeFromGroup
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
static TOOL_ACTION pickNewGroupMember
void DoAddMember(EDA_ITEM *aItem)
A holder to handle information on schematic or board items.
bool Show(bool show) override
bool Empty() const
Checks if there is anything selected.
virtual unsigned int GetSize() const override
Return the number of stored items.
virtual void OnModify()
Must be called after a change in order to set the "modify" flag of the current screen and update the ...
Common, abstract interface for edit frames.
Information pertinent to a Pcbnew printed circuit board.
Used when the right click button is pressed, or when the select tool is in effect.
class ZONE, managed by a footprint
A base class for most all the KiCad significant classes used in schematics and boards.
void Remove(BOARD_ITEM *aBoardItem, REMOVE_MODE aMode=REMOVE_MODE::NORMAL) override
Removes an item from the container.
virtual void Push(const wxString &aMessage=wxT("A commit"), bool aCreateUndoEntry=true, bool aSetDirtyBit=true) override
Revert the commit by restoring the modified items state.
static TOOL_ACTION groupEnter
static TOOL_ACTION selectionCursor
Select a single item under the cursor position.
static TOOL_ACTION groupProperties
KICAD_T Type() const
Returns the type of object.