diff options
author | Bayram Çiçek <mail@bayramcicek.com.tr> | 2021-07-08 12:56:23 +0300 |
---|---|---|
committer | Muhammet Kara <muhammet.kara@collabora.com> | 2021-08-20 11:13:21 +0200 |
commit | 4bb59cd1f45133994d3d13642367470f528094f4 (patch) | |
tree | 575dd198a85b01560f4be9efd3cb8cedde2c6c9c /editeng | |
parent | fc7fbbd8ba089570c93917eedf1de0512cc0ba3b (diff) |
tdf#91519: prevent jump to top of the comment view
In Writer,
there are 3 issues about comment section:
- comment section scrolls to top of its view
when clicking inside a comment view.
- clicking inside a comment view, scrolls the
view to old cursor location automatically
(if old cursor out of the visible area)
- comment section scrolls automatically to the
old *selected* text (if it's out of visible area)
when clicking inside the Writer canvas view
this commit is intended to solve these issues
Change-Id: If7d62373f5215adea85512b66b78736e04e02c3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118638
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 512a3bf54915..1d4ebfae186c 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -282,7 +282,12 @@ void EditView::SetSelection( const ESelection& rESel ) pImpEditView->SetEditSelection( aNewSelection ); pImpEditView->DrawSelectionXOR(); bool bGotoCursor = pImpEditView->DoAutoScroll(); - ShowCursor( bGotoCursor ); + + // comments section in Writer: + // don't scroll to the selection if it is + // out of visible area of comment canvas. + if (HasSelection()) + ShowCursor( bGotoCursor ); } ESelection EditView::GetSelection() const |