summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdmrkv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdmrkv.cxx')
-rw-r--r--svx/source/svdraw/svdmrkv.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 6499708c6186..805b56eb207f 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -970,9 +970,12 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode)
aNewItem.SetGradientValue(aGrad);
// add undo to allow user to take back this step
- pModel->BegUndo(SVX_RESSTR(SIP_XA_FILLTRANSPARENCE));
- pModel->AddUndo(pModel->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
- pModel->EndUndo();
+ if( pModel->IsUndoEnabled() )
+ {
+ pModel->BegUndo(SVX_RESSTR(SIP_XA_FILLTRANSPARENCE));
+ pModel->AddUndo(pModel->GetSdrUndoFactory().CreateUndoAttrObject(*pObj));
+ pModel->EndUndo();
+ }
//pObj->SetItemAndBroadcast(aNewItem);
SfxItemSet aNewSet(pModel->GetItemPool());