History

Merge pull request #8179 from SamGondelman/snapshotFix3

Various snapshot improvements

Brad Hefta-Gaub committed 10 years ago

Commit b8d79ec2 parents 819cab4 890b22410 files · +99 −356Browse files

Showing the changes to interface/src/Application.cpp (1 of 10 files). Show all

Unified · Split

interface/src/Application.cpp+2−10
@@ -1525,7 +1525,6 @@ void Application::initializeUi() { · 1524 unmodified lines
15251525
15261526 // For some reason there is already an "Application" object in the QML context,
15271527 // though I can't find it. Hence, "ApplicationInterface"
1528− rootContext->setContextProperty("SnapshotUploader", new SnapshotUploader());
15291528 rootContext->setContextProperty("ApplicationInterface", this);
15301529 rootContext->setContextProperty("Audio", &AudioScriptingInterface::getInstance());
15311530 rootContext->setContextProperty("Controller", DependencyManager::get<controller::ScriptingInterface>().data());
@@ -5046,16 +5045,9 @@ void Application::takeSnapshot() { · 3514 unmodified lines
50465045 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));
50475046 player->play();
50485047
5049− QString fileName = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getScreenshot());
5048+ QString path = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getScreenshot());
50505049
5051− auto accountManager = DependencyManager::get<AccountManager>();
5052− if (!accountManager->isLoggedIn()) {
5053− return;
5054− }
5055−
5056− DependencyManager::get<OffscreenUi>()->load("hifi/dialogs/SnapshotShareDialog.qml", [=](QQmlContext*, QObject* dialog) {
5057− dialog->setProperty("source", QUrl::fromLocalFile(fileName));
5058− });
5050+ emit DependencyManager::get<WindowScriptingInterface>()->snapshotTaken(path);
50595051 }
50605052
50615053 float Application::getRenderResolutionScale() const {