summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2017-07-13 01:37:03 +0300
committerJasem Mutlaq <[email protected]>2017-07-13 01:37:03 +0300
commitcba3e10d748cdd6e4cf00d9dcfac5bda65fa7d79 (patch)
tree9cce949755598a5f1fa01791fb5c35f843c5793c
parenta48e721fb88080a2e75679f1246d5e9059deb3cb (diff)
Implement better solution to remember autoWCS and solverWCS option settings since we change them on the fly in PAH
-rw-r--r--kstars/ekos/align/align.cpp17
-rw-r--r--kstars/ekos/align/align.h4
2 files changed, 20 insertions, 1 deletions
diff --git a/kstars/ekos/align/align.cpp b/kstars/ekos/align/align.cpp
index 52af4a2..07abd9f 100644
--- a/kstars/ekos/align/align.cpp
+++ b/kstars/ekos/align/align.cpp
@@ -188,6 +188,9 @@ Align::Align()
altStage = ALT_INIT;
azStage = AZ_INIT;
+ rememberSolverWCS = Options::astrometrySolverWCS();
+ rememberAutoWCS = Options::autoWCS();
+
// Online/Offline/Remote solver check
solverTypeGroup->setId(onlineSolverR, SOLVER_ONLINE);
solverTypeGroup->setId(offlineSolverR, SOLVER_OFFLINE);
@@ -4269,6 +4272,10 @@ void Align::startPAHProcess()
currentGotoMode = GOTO_NOTHING;
loadSlewB->setEnabled(false);
+ rememberSolverWCS = Options::astrometrySolverWCS();
+ rememberAutoWCS = Options::autoWCS();
+
+ Options::setAutoWCS(false);
Options::setAstrometrySolverWCS(true);
if (Options::limitedResourcesMode())
@@ -4440,6 +4447,12 @@ void Align::setPAHCorrectionSelectionComplete()
{
pahStage = PAH_PRE_REFRESH;
+ // If user stops here, we restore the settings, if not we
+ // disable again in the refresh process
+ // and restore when refresh is complete
+ Options::setAstrometrySolverWCS(rememberSolverWCS);
+ Options::setAutoWCS(rememberAutoWCS);
+
PAHWidgets->setCurrentWidget(PAHRefreshPage);
}
@@ -4454,6 +4467,7 @@ void Align::startPAHRefreshProcess()
alignView->toggleEQGrid();
Options::setAstrometrySolverWCS(false);
+ Options::setAutoWCS(false);
// We for refresh, just capture really
captureAndSolve();
@@ -4465,7 +4479,8 @@ void Align::setPAHRefreshComplete()
abort();
- Options::setAstrometrySolverWCS(true);
+ Options::setAstrometrySolverWCS(rememberSolverWCS);
+ Options::setAutoWCS(rememberAutoWCS);
restartPAHProcess();
}
diff --git a/kstars/ekos/align/align.h b/kstars/ekos/align/align.h
index 09033a4..9c32dc3 100644
--- a/kstars/ekos/align/align.h
+++ b/kstars/ekos/align/align.h
@@ -614,6 +614,10 @@ class Align : public QWidget, public Ui::Align
// Polar Alignment Helper
PAHStage pahStage;
+ // keep track of autoWSC
+ bool rememberAutoWCS;
+ bool rememberSolverWCS;
+
// Sky centers
typedef struct
{