Kaydet (Commit) 655d7340 authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#116429 unwanted extra step in undo insert shape

Change-Id: I23065275baa60a09f2a3c15513e3f2b8160e2bf0
Reviewed-on: https://gerrit.libreoffice.org/51706Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 8d553719
......@@ -2002,6 +2002,14 @@ bool SwFEShell::ImpEndCreate()
}
else
{
if (rSdrObj.GetName().isEmpty())
{
bool bRestore = GetDoc()->GetIDocumentUndoRedo().DoesDrawUndo();
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(false);
rSdrObj.SetName(GetUniqueShapeName());
GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(bRestore);
}
Point aRelNullPt;
if( OBJ_CAPTION == nIdent )
aRelNullPt = static_cast<SdrCaptionObj&>(rSdrObj).GetTailPos();
......@@ -2057,9 +2065,6 @@ bool SwFEShell::ImpEndCreate()
pAnch = pTmp;
}
if (rSdrObj.GetName().isEmpty())
rSdrObj.SetName(GetUniqueShapeName());
pContact->ConnectToLayout();
// mark object at frame the object is inserted at.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment