Commit f7586602 authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Put connect statements when we run solver since we disconnect the slots upon exist

parent db63f1a5
......@@ -46,17 +46,6 @@ OfflineAstrometryParser::OfflineAstrometryParser() : AstrometryParser()
astrometryFilesOK = false;
connect(&solver, SIGNAL(finished(int)), this, SLOT(solverComplete(int)));
connect(&solver, SIGNAL(readyReadStandardOutput()), this, SLOT(logSolver()));
// Reset parity on solver failure
connect(this, &OfflineAstrometryParser::solverFailed, this, [&]() { parity = QString();});
connect(&solver, &QProcess::errorOccurred, this, [&]()
{
align->appendLogText(i18n("Error starting solver: %1", solver.errorString()));
emit solverFailed();
});
}
OfflineAstrometryParser::~OfflineAstrometryParser()
......@@ -203,7 +192,17 @@ bool OfflineAstrometryParser::startSovler(const QString &filename, const QStrin
fitsFile = filename;
solver.kill();
connect(&solver, SIGNAL(finished(int)), this, SLOT(solverComplete(int)));
connect(&solver, SIGNAL(readyReadStandardOutput()), this, SLOT(logSolver()));
// Reset parity on solver failure
connect(this, &OfflineAstrometryParser::solverFailed, this, [&]() { parity = QString();});
connect(&solver, &QProcess::errorOccurred, this, [&]()
{
align->appendLogText(i18n("Error starting solver: %1", solver.errorString()));
emit solverFailed();
});
solverTimer.start();
......@@ -284,7 +283,7 @@ void OfflineAstrometryParser::wcsinfoComplete(int exist_status)
else if (key_value[0] == "pixscale")
pixscale = key_value[1].toDouble();
else if (key_value[0] == "parity")
parity = (key_value[1].toInt() > 0) ? "pos" : "neg";
parity = (key_value[1].toInt() == 0) ? "pos" : "neg";
}
}
......
Supports Markdown
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