Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions interface/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <QtNetwork/QLocalServer>
#include <QtQuick/QQuickWindow>
#include <QWidget>
#include <QtConcurrent/QtConcurrentRun>

#include <AccountManager.h>
#include <AddressManager.h>
Expand Down Expand Up @@ -726,7 +727,7 @@ bool Application::takeSnapshotOperators(std::queue<SnapshotOperator>& snapshotOp

void Application::takeSnapshot(bool notify, bool includeAnimated, float aspectRatio, const QString& filename) {
addSnapshotOperator(std::make_tuple([notify, includeAnimated, aspectRatio, filename](const QImage& snapshot) {
qApp->postLambdaEvent([snapshot, notify, includeAnimated, aspectRatio, filename] {
QtConcurrent::run([snapshot, notify, includeAnimated, aspectRatio, filename] {
QString path = DependencyManager::get<Snapshot>()->saveSnapshot(snapshot, filename, TestScriptingInterface::getInstance()->getTestResultsLocation());

// If we're not doing an animated snapshot as well...
Expand All @@ -745,7 +746,7 @@ void Application::takeSnapshot(bool notify, bool includeAnimated, float aspectRa

void Application::takeSecondaryCameraSnapshot(const bool& notify, const QString& filename) {
addSnapshotOperator(std::make_tuple([notify, filename](const QImage& snapshot) {
qApp->postLambdaEvent([snapshot, notify, filename] {
QtConcurrent::run([snapshot, notify, filename] {
QString snapshotPath = DependencyManager::get<Snapshot>()->saveSnapshot(snapshot, filename, TestScriptingInterface::getInstance()->getTestResultsLocation());

emit DependencyManager::get<WindowScriptingInterface>()->stillSnapshotTaken(snapshotPath, notify);
Expand All @@ -754,7 +755,7 @@ void Application::takeSecondaryCameraSnapshot(const bool& notify, const QString&
}

void Application::takeSecondaryCamera360Snapshot(const glm::vec3& cameraPosition, const bool& cubemapOutputFormat, const bool& notify, const QString& filename) {
postLambdaEvent([notify, filename, cubemapOutputFormat, cameraPosition] {
QtConcurrent::run([notify, filename, cubemapOutputFormat, cameraPosition] {
DependencyManager::get<Snapshot>()->save360Snapshot(cameraPosition, cubemapOutputFormat, notify, filename);
});
}
Expand Down
Loading