diff options
author | Andre Fischer <af@apache.org> | 2012-07-13 07:33:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-13 09:32:02 +0100 |
commit | e0dfd32be2e4c3ee389b180fd45348fb1b800e9d (patch) | |
tree | d565eadfd5433d5c060df38eacbcb92e3d9ba63e /sd/source/ui/view | |
parent | 2c99bbe1b7c94b90df73722667ea32c58824489f (diff) |
Resolves: #i120172# Add missing undo action for changing PresObj index
Reported by: Shan Zhu
Fixed by: Andre Fischer
(cherry picked from commit 1289f5be48f50b38b16fb0ad34c7743317e8c79d)
Change-Id: I6c65dbe9bc87a64ebb2b46a9dc2fda855900c810
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/drawview.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index ff7f3c4cc488..0d7839ffd862 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -588,6 +588,13 @@ void DrawView::DeleteMarked() Rectangle aRect( pObj->GetLogicRect() ); SdrObject* pNewObj = pPage->InsertAutoLayoutShape( 0, ePresObjKind, bVertical, aRect, true ); + // Move the new PresObj to the position before the + // object it will replace. + pUndoManager->AddUndoAction( + mpDoc->GetSdrUndoFactory().CreateUndoObjectOrdNum( + *pNewObj, + pNewObj->GetOrdNum(), + pObj->GetOrdNum())); pPage->SetObjectOrdNum( pNewObj->GetOrdNum(), pObj->GetOrdNum() ); bResetLayout = true; |