diff --git a/python/core/composer/qgscomposeritemcommand.sip b/python/core/composer/qgscomposeritemcommand.sip index 0ecbaef4a9b..41c06b17bd5 100644 --- a/python/core/composer/qgscomposeritemcommand.sip +++ b/python/core/composer/qgscomposeritemcommand.sip @@ -90,7 +90,8 @@ class QgsComposerMergeCommand : QgsComposerItemCommand //item ItemOutlineWidth, ItemMove, - ItemRotation + ItemRotation, + ItemTransparency }; QgsComposerMergeCommand( Context c, QgsComposerItem* item, const QString& text ); diff --git a/src/app/composer/qgscomposeritemwidget.cpp b/src/app/composer/qgscomposeritemwidget.cpp index c729ad8ca62..57896254bc8 100644 --- a/src/app/composer/qgscomposeritemwidget.cpp +++ b/src/app/composer/qgscomposeritemwidget.cpp @@ -401,7 +401,9 @@ void QgsComposerItemWidget::on_mBlendModeCombo_currentIndexChanged( int index ) Q_UNUSED( index ); if ( mItem ) { + mItem->beginCommand( tr( "Item blend mode changed" ) ); mItem->setBlendMode( mBlendModeCombo->blendMode() ); + mItem->endCommand(); } } @@ -409,7 +411,9 @@ void QgsComposerItemWidget::on_mTransparencySlider_valueChanged( int value ) { if ( mItem ) { + mItem->beginCommand( tr( "Item transparency changed" ), QgsComposerMergeCommand::ItemTransparency ); mItem->setTransparency( value ); + mItem->endCommand(); } } diff --git a/src/app/composer/qgscomposermapwidget.cpp b/src/app/composer/qgscomposermapwidget.cpp index 445bb2eab11..118b48afb02 100644 --- a/src/app/composer/qgscomposermapwidget.cpp +++ b/src/app/composer/qgscomposermapwidget.cpp @@ -773,12 +773,18 @@ void QgsComposerMapWidget::on_mOverviewFrameStyleButton_clicked() return; } + mComposerMap->beginCommand( tr( "Overview frame style changed" ) ); QgsSymbolV2SelectorDialog d( mComposerMap->overviewFrameMapSymbol(), QgsStyleV2::defaultStyle(), 0 ); //QgsSymbolV2PropertiesDialog d( mComposerMap->overviewFrameMapSymbol(), 0, this ); if ( d.exec() == QDialog::Accepted ) { updateOverviewSymbolMarker(); + mComposerMap->endCommand(); + } + else + { + mComposerMap->cancelCommand(); } } @@ -892,10 +898,16 @@ void QgsComposerMapWidget::on_mGridLineStyleButton_clicked() return; } + mComposerMap->beginCommand( tr( "Grid line style changed" ) ); QgsSymbolV2SelectorDialog d( mComposerMap->gridLineSymbol(), QgsStyleV2::defaultStyle(), 0 ); if ( d.exec() == QDialog::Accepted ) { updateLineSymbolMarker(); + mComposerMap->endCommand(); + } + else + { + mComposerMap->cancelCommand(); } mComposerMap->update(); diff --git a/src/app/composer/qgscomposershapewidget.cpp b/src/app/composer/qgscomposershapewidget.cpp index f43464f44e7..419948856ec 100644 --- a/src/app/composer/qgscomposershapewidget.cpp +++ b/src/app/composer/qgscomposershapewidget.cpp @@ -111,11 +111,17 @@ void QgsComposerShapeWidget::on_mShapeStyleButton_clicked() coverageLayer = mComposerShape->composition()->atlasComposition().coverageLayer(); } + mComposerShape->beginCommand( tr( "Shape style changed" ) ); QgsSymbolV2SelectorDialog d( mComposerShape->shapeStyleSymbol(), QgsStyleV2::defaultStyle(), coverageLayer ); if ( d.exec() == QDialog::Accepted ) { updateShapeStyle(); + mComposerShape->endCommand(); + } + else + { + mComposerShape->cancelCommand(); } } diff --git a/src/core/composer/qgscomposeritemcommand.h b/src/core/composer/qgscomposeritemcommand.h index 83e66ed777a..8f6ef31cbbd 100644 --- a/src/core/composer/qgscomposeritemcommand.h +++ b/src/core/composer/qgscomposeritemcommand.h @@ -118,7 +118,8 @@ class CORE_EXPORT QgsComposerMergeCommand: public QgsComposerItemCommand //item ItemOutlineWidth, ItemMove, - ItemRotation + ItemRotation, + ItemTransparency }; QgsComposerMergeCommand( Context c, QgsComposerItem* item, const QString& text );