svx/source/svdraw/svdedtv.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
New commits: commit cb5285d544a355026a38c69ccf5473956d60e4ee Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Thu Oct 5 21:23:49 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Oct 6 11:45:33 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/+/157607 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 88589a52271f..8c1c60bba681 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -992,12 +992,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); @@ -1010,6 +1004,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);