Kaydet (Commit) 508013d7 authored tarafından Tamás Zolnai's avatar Tamás Zolnai

sw lok: followup commit for change about scrolling to visible cursor

Revert small part of this commit:
83b7bfc0

Thanks Jan Holesovsky to catching it.

Change-Id: I885c9f3da622052685d1e46f6358783fc7f8cb9a
Reviewed-on: https://gerrit.libreoffice.org/52684Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTamás Zolnai <tamas.zolnai@collabora.com>
üst a953fa1c
......@@ -1411,13 +1411,6 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
SET_CURR_SHELL( this );
ClearUpCursors();
bool bScrollWin = eFlags & SwCursorShell::SCROLLWIN;
// Don't scroll to the cursor if it's moved by an other view
if(comphelper::LibreOfficeKit::isActive())
{
bScrollWin = SfxLokHelper::getView() != SfxLokHelper::getView(GetSfxViewShell());
}
if (ActionPend())
{
if ( eFlags & SwCursorShell::READONLY )
......@@ -1560,7 +1553,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
m_pVisibleCursor->Hide(); // always hide visible Cursor
// scroll Cursor to visible area
if( bScrollWin &&
if( eFlags & SwCursorShell::SCROLLWIN &&
(HasSelection() || eFlags & SwCursorShell::READONLY ||
!IsCursorReadonly()) )
{
......@@ -1818,7 +1811,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
}
// scroll Cursor to visible area
if( m_bHasFocus && bScrollWin&&
if( m_bHasFocus && eFlags & SwCursorShell::SCROLLWIN &&
(HasSelection() || eFlags & SwCursorShell::READONLY ||
!IsCursorReadonly() || GetViewOptions()->IsSelectionInReadonly()) )
{
......@@ -1830,7 +1823,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
m_bSVCursorVis = bSav;
}
} while( bScrollWin );
} while( eFlags & SwCursorShell::SCROLLWIN );
if( m_pBlockCursor )
RefreshBlockCursor();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment