@@ -715,50 +715,16 @@ void QgsLayoutView::deleteSelectedItems()
715715 return ;
716716 }
717717
718- #if 0 //TODO
719- if ( mCurrentTool == QgsComposerView::EditNodesItem )
720- {
721- if ( mNodesItemIndex != -1 )
722- {
723- composition()->beginCommand( mNodesItem, tr( "Remove item node" ) );
724- if ( mNodesItem->removeNode( mNodesItemIndex ) )
725- {
726- composition()->endCommand();
727- if ( mNodesItem->nodesSize() > 0 )
728- {
729- mNodesItemIndex = mNodesItem->selectedNode();
730- // setSelectedNode( mNodesItem, mNodesItemIndex );
731- }
732- else
733- {
734- mNodesItemIndex = -1;
735- mNodesItem = nullptr;
736- }
737- scene()->update();
738- }
739- else
740- {
741- composition()->cancelCommand();
742- }
743- }
744- }
745- else
746- {
747- #endif
748- const QList<QgsLayoutItem *> selectedItems = currentLayout ()->selectedLayoutItems ();
749-
750- currentLayout ()->undoStack ()->beginMacro ( tr ( " Delete Items" ) );
751- // delete selected items
752- for ( QgsLayoutItem *item : selectedItems )
753- {
754- currentLayout ()->removeLayoutItem ( item );
755- }
756- currentLayout ()->undoStack ()->endMacro ();
757- currentLayout ()->project ()->setDirty ( true );
718+ const QList<QgsLayoutItem *> selectedItems = currentLayout ()->selectedLayoutItems ();
758719
759- #if 0
720+ currentLayout ()->undoStack ()->beginMacro ( tr ( " Delete Items" ) );
721+ // delete selected items
722+ for ( QgsLayoutItem *item : selectedItems )
723+ {
724+ currentLayout ()->removeLayoutItem ( item );
760725 }
761- #endif
726+ currentLayout ()->undoStack ()->endMacro ();
727+ currentLayout ()->project ()->setDirty ( true );
762728}
763729
764730void QgsLayoutView::groupSelectedItems ()
0 commit comments