svx/source/svdraw/svdedtv.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
New commits: commit aaa86a71ddf1e351117f24edcabd2342dae11bdd Author: Caolán McNamara <[email protected]> AuthorDate: Thu Oct 5 21:23:49 2023 +0100 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Wed Oct 11 00:03:41 2023 +0200 Related: cool#7373 set name of object before broadcasting ScDrawChanged which adding it to undo does. That way the object already has a name when the navigator looks for the new object's name, and so a drawing shape appears in the navigator when it appears in the document. Change-Id: I47fed30753bc186e462cc5be8f86d51325192da9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157608 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 58812d849403..c93e2d950793 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -995,12 +995,6 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser if (!pObj->IsInserted()) { rPV.GetObjList()->InsertObject(pObj, SAL_MAX_SIZE); } - if( IsUndoEnabled()) - { - bool bDontDeleteReally = true; - EndTextEditCurrentView(bDontDeleteReally); - AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj)); - } css::uno::Reference<lang::XServiceInfo> xServices(GetModel()->getUnoModel(), css::uno::UNO_QUERY); @@ -1013,6 +1007,13 @@ bool SdrEditView::InsertObjectAtView(SdrObject* pObj, SdrPageView& rPV, SdrInser GetModel()->EnableUndo(bUndo); } + if (IsUndoEnabled()) + { + bool bDontDeleteReally = true; + EndTextEditCurrentView(bDontDeleteReally); + AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj)); + } + if (!(nOptions & SdrInsertFlags::DONTMARK)) { if (!(nOptions & SdrInsertFlags::ADDMARK)) UnmarkAllObj(); MarkObj(pObj,&rPV);
