Skip to content

Commit

Permalink
Fix undo/redo of newly added maps
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Nov 7, 2017
1 parent 72a1f77 commit 87d497e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gui/layout/qgslayoutviewtooladditem.cpp
Expand Up @@ -119,10 +119,9 @@ void QgsLayoutViewToolAddItem::layoutReleaseEvent( QgsLayoutViewMouseEvent *even
settings.setValue( QStringLiteral( "LayoutDesigner/lastItemHeight" ), item->sizeWithUnits().height() );
settings.setValue( QStringLiteral( "LayoutDesigner/lastSizeUnit" ), static_cast< int >( item->sizeWithUnits().units() ) );

layout()->addLayoutItem( item );

QgsGui::layoutItemGuiRegistry()->newItemAddedToLayout( mItemMetadataId, item );

layout()->addLayoutItem( item );
layout()->setSelectedItem( item );
emit createdItem();
}
Expand Down

0 comments on commit 87d497e

Please sign in to comment.