From 4db110a6e1da85a9e11831bb00e77600245d0e24 Mon Sep 17 00:00:00 2001 From: Niraj Venkat Date: Wed, 3 Jun 2015 15:09:45 -0700 Subject: [PATCH] Final fixes. Snapshot should be good now --- interface/src/Application.cpp | 3 --- interface/src/MainWindow.h | 4 ++-- interface/src/ui/Snapshot.cpp | 9 ++------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 82d5e85c56..97e2bfafbf 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3450,9 +3450,6 @@ void Application::displaySide(Camera& theCamera, bool selfAvatarOnly, bool billb _overlays.renderWorld(true); } - - - activeRenderingThread = nullptr; } diff --git a/interface/src/MainWindow.h b/interface/src/MainWindow.h index 6ebd19b2a9..eb262e0f97 100644 --- a/interface/src/MainWindow.h +++ b/interface/src/MainWindow.h @@ -36,8 +36,8 @@ protected: virtual void showEvent(QShowEvent* event); virtual void hideEvent(QHideEvent* event); virtual void changeEvent(QEvent* event); - virtual void dragEnterEvent(QDragEnterEvent *e); - virtual void dropEvent(QDropEvent *e); + virtual void dragEnterEvent(QDragEnterEvent *e); + virtual void dropEvent(QDropEvent *e); private: Setting::Handle _windowGeometry; diff --git a/interface/src/ui/Snapshot.cpp b/interface/src/ui/Snapshot.cpp index 944172a6f6..2bfe92a504 100644 --- a/interface/src/ui/Snapshot.cpp +++ b/interface/src/ui/Snapshot.cpp @@ -63,6 +63,7 @@ SnapshotMetaData* Snapshot::parseSnapshotData(QString snapshotPath) { } QString Snapshot::saveSnapshot(QImage image) { + QFile* snapshotFile = savedFileForSnapshot(image, false); // we don't need the snapshot file, so close it, grab its filename and delete it @@ -86,10 +87,6 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) { QUrl currentURL = DependencyManager::get()->currentAddress(); shot.setText(URL, currentURL.toString()); - QString formattedLocation = QString(currentURL.toString()); - // replace decimal . with '-' - formattedLocation.replace('.', '-'); - QString username = AccountManager::getInstance().getAccountInfo().getUsername(); // normalize username, replace all non alphanumeric with '-' username.replace(QRegExp("[^A-Za-z0-9_]"), "-"); @@ -110,7 +107,6 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) { snapshotFullPath.append(filename); QFile* imageFile = new QFile(snapshotFullPath); - std::string str = snapshotFullPath.toStdString(); imageFile->open(QIODevice::WriteOnly); shot.save(imageFile, 0, IMAGE_QUALITY); @@ -118,8 +114,7 @@ QFile* Snapshot::savedFileForSnapshot(QImage & shot, bool isTemporary) { return imageFile; - } - else { + } else { QTemporaryFile* imageTempFile = new QTemporaryFile(QDir::tempPath() + "/XXXXXX-" + filename); if (!imageTempFile->open()) {