summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-26 08:13:54 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-10-26 08:13:54 (GMT)
commitf7586602344cb7bb3e4c4ec9dfb508e3fbd27724 (patch)
tree759f16278e613ff5ff2632c9e0fbecad0ca75d97
parentdb63f1a530cb391796ae0402c6cc0b4250215546 (diff)
Put connect statements when we run solver since we disconnect the slots upon exist
-rw-r--r--kstars/ekos/align/offlineastrometryparser.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/kstars/ekos/align/offlineastrometryparser.cpp b/kstars/ekos/align/offlineastrometryparser.cpp
index 34ba849..8aa82a4 100644
--- a/kstars/ekos/align/offlineastrometryparser.cpp
+++ b/kstars/ekos/align/offlineastrometryparser.cpp
@@ -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";
}
}