summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-08-12 16:01:51 +0100
committerAndras Timar <andras.timar@collabora.com>2021-08-16 10:15:15 +0200
commita7958e253d159b01f68519d2c8a9d0e7554958cd (patch)
tree6eb101b6aa63b6512c62a48d04c5674a84d83e9f /sfx2
parentd16276bb5e717a4c4e61117694b9acb6bf25d96f (diff)
Resolves: tdf#143843 disable the recently-used widget during load
We show a busy-cursor but the widget can still be interacted with so another document can be launched by clicking on another recently-used item while the first one is still loading, and the recently-used widget isn't prepared for this scenario so the second to complete load will crash. Disable the recently-used widget when its cursor is set to busy, and in the (unlikely) case that the load doesn't complete normally (missing document or load filter error) and the recently-used widget still exists and its cursor is unset from busy then reenable it for user input at that point. Change-Id: I8f4487f3dbede14c9778e49442366bd9445f1d63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120363 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/recentdocsview.cxx1
-rw-r--r--sfx2/source/control/recentdocsviewitem.cxx1
2 files changed, 2 insertions, 0 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index e74c354bef92..4bd614bf8836 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -431,6 +431,7 @@ IMPL_LINK( RecentDocsView, ExecuteHdl_Impl, void*, p, void )
{
pLoadRecentFile->pView->DispatchedLoadRecentUsedFile();
pLoadRecentFile->pView->SetPointer(PointerStyle::Arrow);
+ pLoadRecentFile->pView->Enable();
}
delete pLoadRecentFile;
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index 8a047b20ee8d..d5dafe2d0e2c 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -178,6 +178,7 @@ void RecentDocsViewItem::OpenDocument()
{
// show busy mouse pointer
mrParentView.SetPointer(PointerStyle::Wait);
+ mrParentView.Disable();
Reference<frame::XDispatch> xDispatch;
css::util::URL aTargetURL;