tdf#118696 better fix for sd Navigator object selection

resulting in unexpected view movement

This fix reverts commit 3c86ffd8de and
reintroduces DrawViewShell::MakeVisible with change made to the
passed object rectangle always being the snap rectangle instead of
the rectangle returned from a call to object GetLogicRect.

Change-Id: I05e777545fb1093838c05618e87ad4d4f5ec003c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137008
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
This commit is contained in:
Jim Raykowski
2022-07-30 05:24:38 +02:00
parent 597d21d0d0
commit d87f69cc7e
+5 -10
View File
@@ -74,7 +74,8 @@
#include <framework/FrameworkHelper.hxx>
#include <o3tl/string_view.hxx>
#include <sfx2/zoomitem.hxx>
#include <Window.hxx>
#include <svl/intitem.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -835,17 +836,11 @@ void DrawDocShell::GotoBookmark(std::u16string_view rBookmark)
pDrawViewShell->SwitchPage(nSdPgNum);
}
if (pDrawViewShell->GetDispatcher())
{
// show page
SvxZoomItem aZoom;
aZoom.SetType( SvxZoomType::WHOLEPAGE );
pDrawViewShell->GetDispatcher()->ExecuteList(SID_ATTR_ZOOM, SfxCallMode::ASYNCHRON, { &aZoom });
}
if (pObj != nullptr)
{
// select object
// show and select object
if (vcl::Window* pWindow = pDrawViewShell->GetActiveWindow())
pDrawViewShell->MakeVisible(pObj->GetSnapRect(), *pWindow);
pDrawViewShell->GetView()->UnmarkAll();
pDrawViewShell->GetView()->MarkObj(
pObj,