cui/source/options/treeopt.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
New commits: commit c68e1dca3a5a06248ce129bfb13206753163d71d Author: Bayram Çiçek <bayramcicek2...@gmail.com> AuthorDate: Thu Aug 31 00:01:56 2023 +0300 Commit: Andreas Heinisch <andreas.heini...@yahoo.de> CommitDate: Mon Sep 4 13:10:26 2023 +0200 tdf#49895: show wait cursor while Options dialog loads initializing of the dialogs happens at two stage: - at the loading of the Options dialog - at the time of searching We have to notify the user that there is a process ongoing. Therefore, a wait cursor indicator added to the both stage of the initialization. Change-Id: Ia1c6318aa961424e957ae27ac2ff5f496180cb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156312 Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de> Tested-by: Jenkins diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d514b7deeb7f..1b5e29e2aca2 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -791,6 +791,12 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, weld::Entry&, void) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) { + // initializeFirstNDialog() can take a long time, show wait cursor and disable input + std::unique_ptr<weld::WaitObject> xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); + + // Pause redraw + xTreeLB->freeze(); + if (bIsFirtsInitialize) { m_xSearchEdit->freeze(); @@ -803,9 +809,6 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) bIsFirtsInitialize = false; } - // Pause redraw - xTreeLB->freeze(); - // Apply the search filter OUString aSearchTerm(m_xSearchEdit->get_text()); int nMatchFound = applySearchFilter(aSearchTerm); @@ -1186,6 +1189,9 @@ void OfaTreeOptionsDialog::ActivateLastSelection() m_xSearchEdit->grab_focus(); SelectHdl_Impl(); + // initializeFirstNDialog() can take a long time, show wait cursor + std::unique_ptr<weld::WaitObject> xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); + /* initialize first 25 dialogs which are almost half of the dialogs in a row while Options dialog opens. then clear&reselect to avoid UI test failures. */ initializeFirstNDialog(25);