Commit 8a8615ca authored by Jasem Mutlaq's avatar Jasem Mutlaq

Support resume for aborted jobs

parent 303d1f14
......@@ -35,6 +35,7 @@ SequenceJob::SequenceJob()
activeChip=NULL;
activeCCD=NULL;
activeFilter= NULL;
completed=0;
}
void SequenceJob::abort()
......@@ -249,7 +250,7 @@ void Capture::startSequence()
foreach(SequenceJob *job, jobs)
{
if (job->getStatus() == SequenceJob::JOB_IDLE)
if (job->getStatus() == SequenceJob::JOB_IDLE || job->getStatus() == SequenceJob::JOB_ABORTED)
{
first_job = job;
break;
......@@ -520,6 +521,7 @@ void Capture::newFITS(IBLOB *bp)
}
seqCurrentCount++;
activeJob->setCompleted(seqCurrentCount);
imgProgress->setValue(seqCurrentCount);
appendLogText(i18n("Received image %1 out of %2.", seqCurrentCount, seqTotalCount));
......@@ -925,7 +927,7 @@ void Capture::executeJob(SequenceJob *job)
seqDelay = job->getDelay();
seqCurrentCount = 0;
seqCurrentCount = job->getCompleted();
if (job->isPreview() == false)
{
......
......@@ -49,6 +49,7 @@ class SequenceJob
bool isPreview() { return preview;}
int getDelay() { return delay;}
int getCount() { return count;}
unsigned int getCompleted() { return completed; }
const QString & getPrefix() { return prefix;}
void setActiveCCD(ISD::CCD *ccd) { activeCCD = ccd; }
......@@ -74,6 +75,7 @@ class SequenceJob
void setImageType(int type) { imageType = type;}
void setExposure(double duration) { exposure = duration;}
void setStatusCell(QTableWidgetItem *cell) { statusCell = cell; }
void setCompleted(unsigned int in_completed) { completed = in_completed;}
......@@ -98,6 +100,7 @@ class SequenceJob
bool isoMode;
bool preview;
bool showFITS;
unsigned int completed;
FITSScale captureFilter;
QTableWidgetItem *statusCell;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment