From c3ea176b5811f4f6ba1c15b95e6e97fdaf0ead29 Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 16 May 2018 10:54:58 -0700 Subject: [PATCH] Give me my reticle back! --- interface/src/ui/Snapshot.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interface/src/ui/Snapshot.cpp b/interface/src/ui/Snapshot.cpp index a005fd8be8..6027c6765d 100644 --- a/interface/src/ui/Snapshot.cpp +++ b/interface/src/ui/Snapshot.cpp @@ -33,6 +33,7 @@ #include #include "Application.h" +#include "display-plugins/CompositorHelper.h" #include "SnapshotUploader.h" // filename format: hifi-snap-by-%username%-on-%date%_%time%_@-%location%.jpg @@ -145,6 +146,13 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary, const QSt QFile* imageFile = new QFile(snapshotFullPath); while (!imageFile->open(QIODevice::WriteOnly)) { + // It'd be better for the directory chooser to restore the cursor to its previous state + // after choosing a directory, but if the user has entered this codepath, + // something terrible has happened. Let's just show the user their cursor so they can get + // out of this awful state. + qApp->getApplicationCompositor().getReticleInterface()->setVisible(true); + qApp->getApplicationCompositor().getReticleInterface()->setAllowMouseCapture(true); + snapshotFullPath = OffscreenUi::getExistingDirectory(nullptr, "Write Error - Choose New Snapshots Directory", QStandardPaths::writableLocation(QStandardPaths::DesktopLocation)); if (snapshotFullPath.isEmpty()) { return NULL;