42 aErrorMsg =
_(
"Some selected items cannot be grouped." );
53 aErrorMsg =
_(
"Child items cannot be grouped separately from their parent item." );
61 aErrorMsg =
_(
"Child items cannot be grouped separately from their parent item." );
68 aErrorMsg =
_(
"Some selected items cannot be grouped." );
90 statusPopup.SetText(
_(
"Click on new member..." ) );
92 picker->SetClickHandler(
93 [&](
const VECTOR2D& aPoint ) ->
bool
108 if( !isSymbolEditor )
121 picker->SetMotionHandler(
127 picker->SetCancelHandler(
136 picker->SetFinalizeHandler(
137 [&](
const int& aFinalState )
144 m_frame->GetCanvas()->SetStatusPopup( statusPopup.GetPanel() );
157 picker->ClearHandlers();
158 m_frame->GetCanvas()->SetStatusPopup(
nullptr );
172 for(
int ii = selection.GetSize() - 1; ii >= 0; --ii )
177 selection.Remove( item );
180 if( selection.GetSize() < 2 )
182 if( !errorMsg.IsEmpty() )
183 m_frame->ShowInfoBarWarning( errorMsg );
194 group->SetParent( screen );
196 for(
EDA_ITEM* eda_item : selection )
198 if(
EDA_GROUP* existingGroup = eda_item->GetParentGroup() )
202 group->AddItem( eda_item );
214 if( !errorMsg.IsEmpty() )
215 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