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
1525 1525
1526 // For some reason there is already an "Application" object in the QML context,1526 // For some reason there is already an "Application" object in the QML context,
1527 // though I can't find it. Hence, "ApplicationInterface"1527 // though I can't find it. Hence, "ApplicationInterface"
1528 rootContext->setContextProperty("SnapshotUploader", new SnapshotUploader());
1529 rootContext->setContextProperty("ApplicationInterface", this);1528 rootContext->setContextProperty("ApplicationInterface", this);
1530 rootContext->setContextProperty("Audio", &AudioScriptingInterface::getInstance());1529 rootContext->setContextProperty("Audio", &AudioScriptingInterface::getInstance());
1531 rootContext->setContextProperty("Controller", DependencyManager::get<controller::ScriptingInterface>().data());1530 rootContext->setContextProperty("Controller", DependencyManager::get<controller::ScriptingInterface>().data());
@@ -5046,16 +5045,9 @@ void Application::takeSnapshot() { · 3514 unmodified lines
5046 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));5045 player->setMedia(QUrl::fromLocalFile(inf.absoluteFilePath()));
5047 player->play();5046 player->play();
5048 5047
5049 QString fileName = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getScreenshot());5048 QString path = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getScreenshot());
5050 5049
5051 auto accountManager = DependencyManager::get<AccountManager>();5050 emit DependencyManager::get<WindowScriptingInterface>()->snapshotTaken(path);
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 });
5059}5051}
5060 5052
5061float Application::getRenderResolutionScale() const {5053float Application::getRenderResolutionScale() const {