summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <[email protected]>2015-03-10 00:12:22 +0300
committerJasem Mutlaq <[email protected]>2015-03-10 00:12:22 +0300
commite3510a5b38ce4f652546268916af3e3ecf3afed4 (patch)
treea40a6aecf97c02f8644c3fd4be3a63b70ada7e96
parentd880f2ee5618e2f343fd3f1c588e42407757b278 (diff)
Display WCS notification message if it was enabled before
-rw-r--r--kstars/ekos/align.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/kstars/ekos/align.cpp b/kstars/ekos/align.cpp
index 345a19b..2397cc3 100644
--- a/kstars/ekos/align.cpp
+++ b/kstars/ekos/align.cpp
@@ -1423,6 +1423,8 @@ void Align::setWCS(bool enable)
if (currentCCD == NULL)
return;
+ Options::setWCSAlign(enable);
+
ISwitchVectorProperty *wcsControl = currentCCD->getBaseDevice()->getSwitch("WCS_CONTROL");
if (wcsControl == NULL)
@@ -1435,6 +1437,11 @@ void Align::setWCS(bool enable)
ISwitch *wcs_enable = IUFindSwitch(wcsControl, "WCS_ENABLE");
ISwitch *wcs_disable = IUFindSwitch(wcsControl, "WCS_DISABLE");
+ if (wcs_enable && enable)
+ appendLogText(xi18n("World Coordinate System (WCS) is enabled. CCD rotation must be set either manually in the CCD driver or by solving an image before proceeding to capture any further images, otherwise the WCS information may be invalid."));
+ else if (wcs_disable && !enable)
+ appendLogText(xi18n("World Coordinate System (WCS) is disabled."));
+
if (wcs_enable && wcs_disable)
{
if ( (enable && wcs_enable->s == ISS_ON) || (!enable && wcs_disable->s == ISS_ON))
@@ -1442,13 +1449,9 @@ void Align::setWCS(bool enable)
IUResetSwitch(wcsControl);
if (enable)
- {
- wcs_enable->s = ISS_ON;
- appendLogText(xi18n("World Coordinate System (WCS) is enabled. CCD rotation must be set either manually in the CCD driver or by solving an image before proceeding to capture any further images, otherwise the WCS information may be invalid."));
- }
+ wcs_enable->s = ISS_ON;
else
- {
- appendLogText(xi18n("World Coordinate System (WCS) is disabled."));
+ {
wcs_disable->s = ISS_ON;
m_wcsSynced=false;
}