Commit 0488920b authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Draw using hours information directly. Prevent crash condition in indi standard properties

svn path=/trunk/KDE/kdeedu/kstars/; revision=1202524
parent 28fe4828
......@@ -724,6 +724,9 @@ bool INDIStdDevice::handleNonSidereal()
INDI_E *nameEle = NULL, *tracklp = NULL;
if (currentObject == NULL || currentObject->isSolarSystem() == false)
return false;
kDebug() << "Object of type " << currentObject->typeName();
// Only Meade Classic will offer an explicit SOLAR_SYSTEM property. If such a property exists
......@@ -998,17 +1001,13 @@ bool INDIStdDevice::slew_scope(SkyPoint *scope_target, INDI_E *lp)
HorProp = dp->findProp("HORIZONTAL_COORD_REQUEST");
/* Could not find either properties! */
if (EqProp == NULL && HorProp == NULL)
return false;
if (EqProp->perm == PP_RO)
if (EqProp && EqProp->perm == PP_RO)
EqProp = NULL;
if (HorProp->perm == PP_RO)
if (HorProp && HorProp->perm == PP_RO)
HorProp = NULL;
kDebug() << "Skymap click - RA: " << scope_target->ra().toHMSString() << " DEC: " << scope_target->dec().toDMSString();
//kDebug() << "Skymap click - RA: " << scope_target->ra().toHMSString() << " DEC: " << scope_target->dec().toDMSString();
if (EqProp)
{
......@@ -1037,6 +1036,10 @@ bool INDIStdDevice::slew_scope(SkyPoint *scope_target, INDI_E *lp)
}
/* Could not find either properties! */
if (EqProp == NULL && HorProp == NULL)
return false;
trackEle = lp;
if (trackEle == NULL)
{
......
......@@ -227,7 +227,7 @@ void SkyMap::drawTelescopeSymbols(QPainter &psky)
// express hours in degrees on the celestial sphere
dms raDMS(lp->value);
raDMS.setD ( raDMS.Degrees() * 15.0);
raDMS.setH(lp->value);
lp = eqNum->findElement("DEC");
if (!lp)
......
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