Skip to content

Commit

Permalink
Remove outdated TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 6, 2017
1 parent feec186 commit c3e8401
Showing 1 changed file with 8 additions and 42 deletions.
50 changes: 8 additions & 42 deletions src/gui/layout/qgslayoutview.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit c3e8401

Please sign in to comment.