Skip to content

Commit

Permalink
Consistent tense for undo commands
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 6, 2017
1 parent 48c0fb3 commit 3c87fe1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitem.cpp
Expand Up @@ -100,7 +100,7 @@ void QgsLayoutItem::setId( const QString &id )
}

if ( !shouldBlockUndoCommands() )
mLayout->undoStack()->beginCommand( this, tr( "Change item ID" ) );
mLayout->undoStack()->beginCommand( this, tr( "Item ID changed" ) );

mId = id;

Expand Down
8 changes: 4 additions & 4 deletions src/core/layout/qgslayoutpagecollection.cpp
Expand Up @@ -277,7 +277,7 @@ QList<int> QgsLayoutPageCollection::visiblePageNumbers( QRectF region ) const
void QgsLayoutPageCollection::addPage( QgsLayoutItemPage *page )
{
if ( !mBlockUndoCommands )
mLayout->undoStack()->beginCommand( this, tr( "Add page" ) );
mLayout->undoStack()->beginCommand( this, tr( "Added page" ) );
mPages.append( page );
mLayout->addItem( page );
reflow();
Expand All @@ -288,7 +288,7 @@ void QgsLayoutPageCollection::addPage( QgsLayoutItemPage *page )
void QgsLayoutPageCollection::insertPage( QgsLayoutItemPage *page, int beforePage )
{
if ( !mBlockUndoCommands )
mLayout->undoStack()->beginCommand( this, tr( "Add page" ) );
mLayout->undoStack()->beginCommand( this, tr( "Added page" ) );

if ( beforePage < 0 )
beforePage = 0;
Expand All @@ -314,8 +314,8 @@ void QgsLayoutPageCollection::deletePage( int pageNumber )

if ( !mBlockUndoCommands )
{
mLayout->undoStack()->beginMacro( tr( "Remove page" ) );
mLayout->undoStack()->beginCommand( this, tr( "Remove page" ) );
mLayout->undoStack()->beginMacro( tr( "Removed page" ) );
mLayout->undoStack()->beginCommand( this, tr( "Removed page" ) );
}
emit pageAboutToBeRemoved( pageNumber );
QgsLayoutItemPage *page = mPages.takeAt( pageNumber );
Expand Down

0 comments on commit 3c87fe1

Please sign in to comment.