summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2017-05-17 19:45:33 +0300
committerJasem Mutlaq <[email protected]>2017-05-17 19:45:33 +0300
commit61ed2023841456fb9394b19bfea4e9bb2df0d73e (patch)
tree1edb7a5d838bb9985201feabd33637b3c65b6232
parent5b4cd02897971dcd64de04969dc1113ded4cd528 (diff)
Delete preview job on abort
-rw-r--r--kstars/ekos/capture/capture.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/kstars/ekos/capture/capture.cpp b/kstars/ekos/capture/capture.cpp
index d2c904e..24d0f5c 100644
--- a/kstars/ekos/capture/capture.cpp
+++ b/kstars/ekos/capture/capture.cpp
@@ -464,8 +464,18 @@ void Capture::stop(bool abort)
emit newStatus(Ekos::CAPTURE_ABORTED);
}
- activeJob->disconnect(this);
- activeJob->reset();
+ if (activeJob->isPreview() == false)
+ {
+ activeJob->disconnect(this);
+ activeJob->reset();
+ }
+ else // Delete preview job
+ {
+ jobs.removeOne(activeJob);
+ delete (activeJob);
+ activeJob = nullptr;
+ }
+
}
state = CAPTURE_IDLE;