mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +02:00
Fix the bug
This commit is contained in:
parent
1aec8c5a65
commit
c53111781b
2 changed files with 18 additions and 15 deletions
|
@ -55,10 +55,6 @@ void SnapshotAnimated::saveSnapshotAnimated(QString pathStill, float aspectRatio
|
||||||
// Start the snapshotAnimatedTimer QTimer - argument for this is in milliseconds
|
// Start the snapshotAnimatedTimer QTimer - argument for this is in milliseconds
|
||||||
SnapshotAnimated::snapshotAnimatedTimerRunning = true;
|
SnapshotAnimated::snapshotAnimatedTimerRunning = true;
|
||||||
SnapshotAnimated::snapshotAnimatedTimer->start(SNAPSNOT_ANIMATED_FRAME_DELAY_MSEC);
|
SnapshotAnimated::snapshotAnimatedTimer->start(SNAPSNOT_ANIMATED_FRAME_DELAY_MSEC);
|
||||||
// If we're already in the middle of capturing an animated snapshot...
|
|
||||||
} else {
|
|
||||||
// Just tell the dependency manager that the capture of the still snapshot has taken place.
|
|
||||||
emit dm->snapshotTaken(pathStill, "", false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,9 +84,6 @@ void SnapshotAnimated::captureFrames() {
|
||||||
// If that was the last frame...
|
// If that was the last frame...
|
||||||
if ((SnapshotAnimated::snapshotAnimatedTimestamp - SnapshotAnimated::snapshotAnimatedFirstFrameTimestamp) >= (SnapshotAnimated::snapshotAnimatedDuration.get() * MSECS_PER_SECOND)) {
|
if ((SnapshotAnimated::snapshotAnimatedTimestamp - SnapshotAnimated::snapshotAnimatedFirstFrameTimestamp) >= (SnapshotAnimated::snapshotAnimatedDuration.get() * MSECS_PER_SECOND)) {
|
||||||
SnapshotAnimated::snapshotAnimatedTimerRunning = false;
|
SnapshotAnimated::snapshotAnimatedTimerRunning = false;
|
||||||
// Reset the current frame timestamp
|
|
||||||
SnapshotAnimated::snapshotAnimatedTimestamp = 0;
|
|
||||||
SnapshotAnimated::snapshotAnimatedFirstFrameTimestamp = 0;
|
|
||||||
|
|
||||||
// Notify the user that we're processing the snapshot
|
// Notify the user that we're processing the snapshot
|
||||||
emit SnapshotAnimated::snapshotAnimatedDM->processingGif();
|
emit SnapshotAnimated::snapshotAnimatedDM->processingGif();
|
||||||
|
@ -136,7 +129,10 @@ void SnapshotAnimated::processFrames() {
|
||||||
SnapshotAnimated::snapshotAnimatedFrameVector.squeeze();
|
SnapshotAnimated::snapshotAnimatedFrameVector.squeeze();
|
||||||
SnapshotAnimated::snapshotAnimatedFrameDelayVector.clear();
|
SnapshotAnimated::snapshotAnimatedFrameDelayVector.clear();
|
||||||
SnapshotAnimated::snapshotAnimatedFrameDelayVector.squeeze();
|
SnapshotAnimated::snapshotAnimatedFrameDelayVector.squeeze();
|
||||||
|
// Reset the current frame timestamp
|
||||||
|
SnapshotAnimated::snapshotAnimatedTimestamp = 0;
|
||||||
|
SnapshotAnimated::snapshotAnimatedFirstFrameTimestamp = 0;
|
||||||
|
|
||||||
// Let the dependency manager know that the snapshots have been taken.
|
// Let the window scripting interface know that the snapshots have been taken.
|
||||||
emit SnapshotAnimated::snapshotAnimatedDM->snapshotTaken(SnapshotAnimated::snapshotStillPath, SnapshotAnimated::snapshotAnimatedPath, false);
|
emit SnapshotAnimated::snapshotAnimatedDM->snapshotTaken(SnapshotAnimated::snapshotStillPath, SnapshotAnimated::snapshotAnimatedPath, false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,6 +166,9 @@ function resetButtons(pathStillSnapshot, pathAnimatedSnapshot, notify) {
|
||||||
if (resetOverlays) {
|
if (resetOverlays) {
|
||||||
Menu.setIsOptionChecked("Overlays", true);
|
Menu.setIsOptionChecked("Overlays", true);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// Allow the user to click the snapshot HUD button again
|
||||||
|
button.clicked.connect(onClicked);
|
||||||
}
|
}
|
||||||
// update button states
|
// update button states
|
||||||
button.writeProperty("buttonState", 1);
|
button.writeProperty("buttonState", 1);
|
||||||
|
@ -177,14 +180,16 @@ function resetButtons(pathStillSnapshot, pathAnimatedSnapshot, notify) {
|
||||||
// during which time the user may have moved. So stash that info in the dialog so that
|
// during which time the user may have moved. So stash that info in the dialog so that
|
||||||
// it records the correct href. (We can also stash in .jpegs, but not .gifs.)
|
// it records the correct href. (We can also stash in .jpegs, but not .gifs.)
|
||||||
// last element in data array tells dialog whether we can share or not
|
// last element in data array tells dialog whether we can share or not
|
||||||
confirmShare([
|
var confirmShareContents = [
|
||||||
{ localPath: pathAnimatedSnapshot, href: href },
|
|
||||||
{ localPath: pathStillSnapshot, href: href },
|
{ localPath: pathStillSnapshot, href: href },
|
||||||
{
|
{
|
||||||
canShare: !!isDomainOpen(domainId),
|
canShare: !!isDomainOpen(domainId),
|
||||||
openFeedAfterShare: shouldOpenFeedAfterShare()
|
openFeedAfterShare: shouldOpenFeedAfterShare()
|
||||||
}
|
}];
|
||||||
]);
|
if (pathAnimatedSnapshot !== "") {
|
||||||
|
confirmShareContents.unshift({ localPath: pathAnimatedSnapshot, href: href });
|
||||||
|
}
|
||||||
|
confirmShare(confirmShareContents);
|
||||||
if (clearOverlayWhenMoving) {
|
if (clearOverlayWhenMoving) {
|
||||||
MyAvatar.setClearOverlayWhenMoving(true); // not until after the share dialog
|
MyAvatar.setClearOverlayWhenMoving(true); // not until after the share dialog
|
||||||
}
|
}
|
||||||
|
@ -196,9 +201,11 @@ function processingGif() {
|
||||||
Reticle.visible = reticleVisible;
|
Reticle.visible = reticleVisible;
|
||||||
|
|
||||||
// update button states
|
// update button states
|
||||||
button.writeProperty("buttonState", 1);
|
button.writeProperty("buttonState", 0);
|
||||||
button.writeProperty("defaultState", 1);
|
button.writeProperty("defaultState", 0);
|
||||||
button.writeProperty("hoverState", 3);
|
button.writeProperty("hoverState", 2);
|
||||||
|
// Don't allow the user to click the snapshot button yet
|
||||||
|
button.clicked.disconnect(onClicked);
|
||||||
// show overlays if they were on
|
// show overlays if they were on
|
||||||
if (resetOverlays) {
|
if (resetOverlays) {
|
||||||
Menu.setIsOptionChecked("Overlays", true);
|
Menu.setIsOptionChecked("Overlays", true);
|
||||||
|
|
Loading…
Reference in a new issue