mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 17:35:45 +02:00
Give me my reticle back!
This commit is contained in:
parent
c34605f686
commit
c3ea176b58
1 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
#include "display-plugins/CompositorHelper.h"
|
||||||
#include "SnapshotUploader.h"
|
#include "SnapshotUploader.h"
|
||||||
|
|
||||||
// filename format: hifi-snap-by-%username%-on-%date%_%time%_@-%location%.jpg
|
// 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);
|
QFile* imageFile = new QFile(snapshotFullPath);
|
||||||
while (!imageFile->open(QIODevice::WriteOnly)) {
|
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));
|
snapshotFullPath = OffscreenUi::getExistingDirectory(nullptr, "Write Error - Choose New Snapshots Directory", QStandardPaths::writableLocation(QStandardPaths::DesktopLocation));
|
||||||
if (snapshotFullPath.isEmpty()) {
|
if (snapshotFullPath.isEmpty()) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue