46 aErrorMsg =
_(
"Some selected items cannot be grouped." );
57 aErrorMsg =
_(
"Child items cannot be grouped separately from their parent item." );
65 aErrorMsg =
_(
"Child items cannot be grouped separately from their parent item." );
72 aErrorMsg =
_(
"Some selected items cannot be grouped." );
94 statusPopup.SetText(
_(
"Click on new member..." ) );
96 picker->SetClickHandler(
97 [&](
const VECTOR2D& aPoint ) ->
bool
112 if( !isSymbolEditor )
125 picker->SetMotionHandler(
131 picker->SetCancelHandler(
140 picker->SetFinalizeHandler(
141 [&](
const int& aFinalState )
148 m_frame->GetCanvas()->SetStatusPopup( statusPopup.GetPanel() );
161 picker->ClearHandlers();
162 m_frame->GetCanvas()->SetStatusPopup(
nullptr );
176 for(
int ii = selection.GetSize() - 1; ii >= 0; --ii )
181 selection.Remove( item );
184 if( selection.GetSize() < 2 )
186 if( !errorMsg.IsEmpty() )
187 m_frame->ShowInfoBarWarning( errorMsg );
198 group->SetParent( screen );
200 for(
EDA_ITEM* eda_item : selection )
202 if(
EDA_GROUP* existingGroup = eda_item->GetParentGroup() )
206 group->AddItem( eda_item );
218 if( !errorMsg.IsEmpty() )
219 m_frame->ShowInfoBarWarning( errorMsg );
static TOOL_ACTION selectItem
Select an item (specified as the event parameter).
static TOOL_ACTION pickerTool
static TOOL_ACTION selectionClear
Clear the current selection.
A set of EDA_ITEMs (i.e., without duplicates).
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
EDA_ITEM * GetParent() const
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
A set of SCH_ITEMs (i.e., without duplicates).
Base class for any item which can be embedded within the SCHEMATIC container class,...
const SYMBOL * GetParentSymbol() const
bool IsGroupableType() const
bool Empty() const
Checks if there is anything selected.
The symbol library editor main window.
@ FRAME_SCH_SYMBOL_EDITOR
Class to handle a set of SCH_ITEMs.
VECTOR2< double > VECTOR2D