| commit | 46d6effe3373a39938bde57b43dc45c4a30ce33f | [log] |
|---|---|---|
| author | Jim Raykowski <raykowj@gmail.com> | Mon Nov 16 08:09:11 2020 -0900 |
| committer | Xisco Fauli <xiscofauli@libreoffice.org> | Wed Nov 18 11:28:23 2020 +0100 |
| tree | 119031db7ee29e3ff6d04f45e5ab2cc122ccc47e | |
| parent | ac234ed6bbbe3eb0f1a4c81069ab662c435c3da8 [diff] |
tdf#130629 Don't add object insert undo twice Change-Id: I074afd4397b6fc4631bd00655de56b8a154d7dff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105955 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Jim Raykowski <raykowj@gmail.com> (cherry picked from commit 5110cca39cc55c8977b81f7b09873e626144b29b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105995
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index ac98cef..9da71ab 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx
@@ -3137,7 +3137,12 @@ long SwFEShell::GetSectionWidth( SwFormat const & rFormat ) const } SdrPageView* pPageView = pDrawView->GetSdrPageView(); SdrCreateView::SetupObjLayer(pPageView, pDrawView->GetActiveLayer(), pObj); // switch undo off or this combined with ImpEndCreate will cause two undos // see comment made in SwFEShell::EndCreate (we create our own undo-object!) const bool bUndo(GetDoc()->GetIDocumentUndoRedo().DoesUndo()); GetDoc()->GetIDocumentUndoRedo().DoUndo(false); pDrawView->InsertObjectAtView(pObj, *pPageView); GetDoc()->GetIDocumentUndoRedo().DoUndo(bUndo); } ImpEndCreate(); }