diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-21 14:08:49 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-21 16:27:59 +0100 |
commit | 655d7340536ed2847d1da873b141d8776f791d12 (patch) | |
tree | 9ca8ba4492bfaa7d2129a48452110036d033e355 | |
parent | 8d55371997dd1e98a602b397fa86f20481119047 (diff) |
Resolves: tdf#116429 unwanted extra step in undo insert shape
Change-Id: I23065275baa60a09f2a3c15513e3f2b8160e2bf0
Reviewed-on: https://gerrit.libreoffice.org/51706
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index abdecbf05016..c1aa0935a071 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -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. |