Skip to content
Permalink
Browse files

Remove outdated TODO

  • Loading branch information
nyalldawson committed Dec 1, 2017
1 parent feec186 commit c3e840115ba352ca7105a36749d3dd58d93c68ba
Showing with 8 additions and 42 deletions.
  1. +8 −42 src/gui/layout/qgslayoutview.cpp
@@ -715,50 +715,16 @@ void QgsLayoutView::deleteSelectedItems()
return;
}

#if 0 //TODO
if ( mCurrentTool == QgsComposerView::EditNodesItem )
{
if ( mNodesItemIndex != -1 )
{
composition()->beginCommand( mNodesItem, tr( "Remove item node" ) );
if ( mNodesItem->removeNode( mNodesItemIndex ) )
{
composition()->endCommand();
if ( mNodesItem->nodesSize() > 0 )
{
mNodesItemIndex = mNodesItem->selectedNode();
// setSelectedNode( mNodesItem, mNodesItemIndex );
}
else
{
mNodesItemIndex = -1;
mNodesItem = nullptr;
}
scene()->update();
}
else
{
composition()->cancelCommand();
}
}
}
else
{
#endif
const QList<QgsLayoutItem *> selectedItems = currentLayout()->selectedLayoutItems();

currentLayout()->undoStack()->beginMacro( tr( "Delete Items" ) );
//delete selected items
for ( QgsLayoutItem *item : selectedItems )
{
currentLayout()->removeLayoutItem( item );
}
currentLayout()->undoStack()->endMacro();
currentLayout()->project()->setDirty( true );
const QList<QgsLayoutItem *> selectedItems = currentLayout()->selectedLayoutItems();

#if 0
currentLayout()->undoStack()->beginMacro( tr( "Delete Items" ) );
//delete selected items
for ( QgsLayoutItem *item : selectedItems )
{
currentLayout()->removeLayoutItem( item );
}
#endif
currentLayout()->undoStack()->endMacro();
currentLayout()->project()->setDirty( true );
}

void QgsLayoutView::groupSelectedItems()

0 comments on commit c3e8401

Please sign in to comment.
You can’t perform that action at this time.