sd/source/ui/view/drviews2.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit 950cc4b9947f2b8d230c739432e2a6729a79ab67 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Tue Oct 6 18:53:34 2020 +0530 Commit: Pranam Lashkari <lpra...@collabora.com> CommitDate: Sat Oct 31 09:52:17 2020 +0100 fixed crashing on duplicating slide if slide pan is not visible Change-Id: I30cdc8365d0a31b408dc4eb18b195703837c838a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104027 Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> (cherry picked from commit 494cee664a3b3dc64dc83e1c29b17097d184a2d7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104684 Tested-by: Jenkins Reviewed-by: Pranam Lashkari <lpra...@collabora.com> diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 411b377b3141..279eb753af57 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -766,10 +766,17 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_DUPLICATE_PAGE: { - DuplicateSelectedSlides(rReq); + auto slideSorter = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase()); + SdPage* pNewPage = nullptr; + if(slideSorter) + DuplicateSelectedSlides(rReq); + else + pNewPage = CreateOrDuplicatePage (rReq, mePageKind, GetActualPage()); Cancel(); if(HasCurrentFunction(SID_BEZIER_EDIT) ) GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON); + if(!slideSorter && pNewPage != nullptr) + SwitchPage((pNewPage->GetPageNum()-1)/2); rReq.Done(); } break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits