sc/qa/uitest/calc_tests8/navigator.py | 3 +++ sc/source/ui/navipi/navipi.cxx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
New commits: commit 12d1c9a7000ac9bc816852d658562bb2c0de6bb1 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Jan 28 19:58:55 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Jan 29 16:31:16 2024 +0100 use existing timer to refresh notes later Change-Id: Ic91b8930216b4099ed8af0265497120f9aad0917 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162672 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/qa/uitest/calc_tests8/navigator.py b/sc/qa/uitest/calc_tests8/navigator.py index 9c1769dcf49d..3c4eb1fe1dff 100644 --- a/sc/qa/uitest/calc_tests8/navigator.py +++ b/sc/qa/uitest/calc_tests8/navigator.py @@ -185,6 +185,7 @@ class navigator(UITestCase): def test_tdf158652(self): with self.ui_test.create_doc_in_start_center("calc"): + xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit') xCalcDoc = self.xUITest.getTopFocusWindow() xGridWin = xCalcDoc.getChild("grid_window") @@ -199,10 +200,12 @@ class navigator(UITestCase): commentText = mkPropertyValues({"Text":"CommentText"}) self.xUITest.executeCommandWithParameters(".uno:InsertAnnotation", commentText) + xToolkit.waitUntilAllIdlesDispatched() xComments = xContentBox.getChild("6") self.assertEqual(len(xComments.getChildren()), 1) self.xUITest.executeCommand(".uno:DeleteNote") + xToolkit.waitUntilAllIdlesDispatched() xComments = xContentBox.getChild("6") self.assertEqual(len(xComments.getChildren()), 0) diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index ae95220eeffb..a58491f58dd1 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -540,7 +540,7 @@ void ScNavigatorDlg::Notify( SfxBroadcaster&, const SfxHint& rHint ) m_xLbEntries->Refresh( ScContentId::GRAPHIC ); m_xLbEntries->Refresh( ScContentId::OLEOBJECT ); m_xLbEntries->Refresh( ScContentId::DRAWING ); - m_xLbEntries->Refresh( ScContentId::NOTE ); + aContentIdle.Start(); // Do not search notes immediately break; case SfxHintId::ScAreaLinksChanged: