Merge pull request #8499 from howard-stearns/pr-review-comments-2

pr review comments
This commit is contained in:
Howard Stearns 2016-08-22 11:04:57 -07:00 committed by GitHub
commit ba72dc6375
2 changed files with 38 additions and 38 deletions

View file

@ -205,7 +205,6 @@ void WindowScriptingInterface::copyToClipboard(const QString& text) {
} }
void WindowScriptingInterface::takeSnapshot(bool notify, float aspectRatio) { void WindowScriptingInterface::takeSnapshot(bool notify, float aspectRatio) {
// only evil-doers call takeSnapshot from a random thread
qApp->postLambdaEvent([notify, aspectRatio] { qApp->postLambdaEvent([notify, aspectRatio] {
qApp->takeSnapshot(notify, aspectRatio); qApp->takeSnapshot(notify, aspectRatio);
}); });

View file

@ -9,7 +9,8 @@
// //
var SNAPSHOT_DELAY = 500; // 500ms var SNAPSHOT_DELAY = 500; // 500ms
var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system"); var toolBar = Toolbars.getToolbar("com.highfidelity.interface.toolbar.system");
var resetOverlays, recticleVisible; var resetOverlays;
var reticleVisible;
var button = toolBar.addButton({ var button = toolBar.addButton({
objectName: "snapshot", objectName: "snapshot",
imageURL: Script.resolvePath("assets/images/tools/snap.svg"), imageURL: Script.resolvePath("assets/images/tools/snap.svg"),
@ -37,7 +38,8 @@ function confirmShare(data) {
// 2. Although we currently use a single image, we would like to take snapshot, a selfie, a 360 etc. all at the // 2. Although we currently use a single image, we would like to take snapshot, a selfie, a 360 etc. all at the
// same time, show the user all of them, and have the user deselect any that they do not want to share. // same time, show the user all of them, and have the user deselect any that they do not want to share.
// So we'll ultimately be receiving a set of objects, perhaps with different post processing for each. // So we'll ultimately be receiving a set of objects, perhaps with different post processing for each.
var isLoggedIn, needsLogin = false; var isLoggedIn;
var needsLogin = false;
switch (message) { switch (message) {
case 'ready': case 'ready':
dialog.emitScriptEvent(data); // Send it. dialog.emitScriptEvent(data); // Send it.
@ -55,7 +57,6 @@ function confirmShare(data) {
default: default:
dialog.webEventReceived.disconnect(onMessage); // I'm not certain that this is necessary. If it is, what do we do on normal close? dialog.webEventReceived.disconnect(onMessage); // I'm not certain that this is necessary. If it is, what do we do on normal close?
dialog.close(); dialog.close();
dialog.deleteLater();
isLoggedIn = Account.isLoggedIn(); isLoggedIn = Account.isLoggedIn();
message.forEach(function (submessage) { message.forEach(function (submessage) {
if (submessage.share && !isLoggedIn) { if (submessage.share && !isLoggedIn) {