[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Dec 17 13:43:00 UTC 2019
sw/source/core/crsr/callnk.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit da2000648b852047ec9d865891539c28ada97730
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Dec 16 21:01:13 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Dec 17 14:42:07 2019 +0100
tdf#128567 sw: fix flicker of table selection highlight
Regression from commit c56bf1479cc71d1a2b0639f6383e90c1f7e3655b
(tdf#105330 sw: fix lost cursor on undoing nested table insert,
2019-09-16), the problem was that in case lcl_notifyRow() invokes
SwRowFrame::ModifyNotification(), then the table selection is re-created
all the time, while in case it does not, then it may result in a cursor
loss.
The reason for the flicker is that normally
sw::DocumentTimerManager::m_aDocIdle is not invoked between the
SwEditWin mouse button down/move/up events, but in case the notification
is done, then the idle kicks in once the page frame of the row is
invalidated.
Fix the problem by avoiding the notification in the table selection
case: this makes the flicker go away and the original cursor loss
problem remains fixed, too.
[ It is not clear to me woh can I test if the flicker happens, would
need some mechanism to ensure that the mouse button down/up/move chain
happens without the idle kicking in, perhaps. ]
(cherry picked from commit d4ea54e18346a35590933dd1e8b83d1c12a741de)
Change-Id: I91e0af0d3b1b9824754c0bf0be8535d294601787
Reviewed-on: https://gerrit.libreoffice.org/85271
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 0504e3656331..f02e6336631a 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -75,6 +75,15 @@ static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell const & rShe
return;
const SwTableLine* pLine = pRow->GetTabLine( );
+
+ if (rShell.IsTableMode())
+ {
+ // If we have a table selection, then avoid the notification: it's not necessary (the text
+ // cursor needs no updating) and the notification may kill the selection overlay, leading to
+ // flicker.
+ return;
+ }
+
SwFormatFrameSize aSize = pLine->GetFrameFormat()->GetFrameSize();
pRow->ModifyNotification(nullptr, &aSize);
}
More information about the Libreoffice-commits
mailing list