[Kstars-devel] KDE/kdeedu/kstars/kstars

Jasem Mutlaq mutlaqja at ikarustech.com
Mon Oct 25 09:07:55 CEST 2010


SVN commit 1189437 by mutlaqja:

Mering OpenGL missing files into SVN.

CCMAIL:kstars-devel at kde.org



 M  +24 -28    indi/indistd.cpp  
 A             skyglpainter.cpp   [License: GPL (v2+)]
 A             skyglpainter.h   [License: GPL (v2+)]
 A             skyqpainter.cpp   [License: GPL (v2+)]
 A             skyqpainter.h   [License: GPL (v2+)]
 A             targetlistcomponent.cpp   [License: GPL (v2+)]
 A             targetlistcomponent.h   [License: GPL (v2+)]
 A             texture.cpp   [License: GPL (v2+)]
 A             texture.h   [License: GPL (v2+)]


--- trunk/KDE/kdeedu/kstars/kstars/indi/indistd.cpp #1189436:1189437
@@ -979,35 +979,30 @@
 {
 
     INDI_E *RAEle(NULL), *DecEle(NULL), *AzEle(NULL), *AltEle(NULL), *trackEle(NULL);
-    INDI_P *prop(NULL);
-    int selectedCoord=0;				/* 0 for Equatorial, 1 for Horizontal */
+    INDI_P *EqProp(NULL), *HorProp(NULL);
     bool useJ2000 (false);
 
-    prop = dp->findProp("EQUATORIAL_EOD_COORD_REQUEST");
-    if (prop == NULL)
+    EqProp = dp->findProp("EQUATORIAL_EOD_COORD_REQUEST");
+    if (EqProp == NULL)
     {
 	// Backward compatibility
-	prop = dp->findProp("EQUATORIAL_EOD_COORD");
-	if (prop == NULL)
+        EqProp = dp->findProp("EQUATORIAL_EOD_COORD");
+        if (EqProp == NULL)
 	{
 	// J2000 Property
-        prop = dp->findProp("EQUATORIAL_COORD_REQUEST");
+        EqProp = dp->findProp("EQUATORIAL_COORD_REQUEST");
+        if (EqProp)
+            useJ2000 = true;
+        }
+    }
 
-        if (prop == NULL)
-        {
+    HorProp = dp->findProp("HORIZONTAL_COORD_REQUEST");
 
-                    prop = dp->findProp("HORIZONTAL_COORD_REQUEST");
-                    if (prop == NULL)
+    /* Could not find either properties! */
+    if (EqProp == NULL && HorProp == NULL)
                         	return false;
 
-                    selectedCoord = 1;		/* Select horizontal */
-        }
-        }
-                else
-                    useJ2000 = true;
-     }
-
-        switch (selectedCoord)
+        if (EqProp)
         {
             if (EqProp->perm == PP_RO) return false;
             RAEle  = EqProp->findElement("RA");
@@ -1027,25 +1022,22 @@
 
         kDebug() << "Skymap click - RA: " << scope_target->ra().toHMSString() << " DEC: " << scope_target->dec().toDMSString();
 
-        switch (selectedCoord)
+       if (EqProp)
         {
-        case 0:
+
             if (useJ2000)
                 scope_target->apparentCoord(ksw->data()->ut().djd(), (long double) J2000);
 
             RAEle->write_w->setText(QString("%1:%2:%3").arg(scope_target->ra().hour()).arg(scope_target->ra().minute()).arg(scope_target->ra().second()));
             DecEle->write_w->setText(QString("%1:%2:%3").arg(scope_target->dec().degree()).arg(scope_target->dec().arcmin()).arg(scope_target->dec().arcsec()));
-
-	return true;
 }
 
-        case 1:
-
+       if (HorProp)
+       {
             AzEle->write_w->setText(QString("%1:%2:%3").arg(scope_target->az().degree()).arg(scope_target->az().arcmin()).arg(scope_target->az().arcsec()));
             AltEle->write_w->setText(QString("%1:%2:%3").arg(scope_target->alt().degree()).arg(scope_target->alt().arcmin()).arg(scope_target->alt().arcsec()));
+        }
 
-        stdDev->currentObject = ksw->map()->clickedObject();
-
 	trackEle = lp;
         if (trackEle == NULL)
 	{
@@ -1059,7 +1051,10 @@
          }
 
         trackEle->pp->newSwitch(trackEle);
-        prop->newText();
+        if (EqProp)
+            EqProp->newText();
+        if (HorProp)
+            HorProp->newText();
 
 	return true;
 }
@@ -1134,3 +1129,4 @@
 }
 
 #include "indistd.moc"
+


More information about the Kstars-devel mailing list