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 )
119 m_frame->ShowInfoBarWarning( errorMsg );
127 picker->SetMotionHandler(
133 picker->SetCancelHandler(
142 picker->SetFinalizeHandler(
143 [&](
const int& aFinalState )
150 m_frame->GetCanvas()->SetStatusPopup( statusPopup.GetPanel() );
163 picker->ClearHandlers();
164 m_frame->GetCanvas()->SetStatusPopup(
nullptr );
178 for(
int ii = selection.GetSize() - 1; ii >= 0; --ii )
183 selection.Remove( item );
186 if( selection.GetSize() < 2 )
188 if( !errorMsg.IsEmpty() )
189 m_frame->ShowInfoBarWarning( errorMsg );
200 group->SetParent( screen );
202 for(
EDA_ITEM* eda_item : selection )
204 if(
EDA_GROUP* existingGroup = eda_item->GetParentGroup() )
208 group->AddItem( eda_item );
220 if( !errorMsg.IsEmpty() )
221 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 item had a property changed (except movement)
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