Commit 2052307d authored by Jasem Mutlaq's avatar Jasem Mutlaq
Browse files

Deprecess an empty point when we add a flag, otherwise use ra0/de0 from the object

parent e1ecb213
......@@ -603,13 +603,32 @@ void SkyMap::slotCancelRulerMode(void) {
void SkyMap::slotAddFlag() {
void SkyMap::slotAddFlag()
KStars *ks = KStars::Instance();
// popup FlagManager window and update coordinates
ks->flagManager()->setRaDec( clickedPoint()->ra0(), clickedPoint()->dec0() );
//ra and dec must be the coordinates at J2000. If we clicked on an object, just use the object's ra0, dec0 coords
//if we clicked on empty sky, we need to precess to J2000.
dms J2000RA, J2000DE;
if ( clickedObject() )
J2000RA = clickedObject()->ra0();
J2000DE = clickedObject()->dec0();
SkyPoint deprecessedPoint = clickedPoint()->deprecess( data->updateNum() );
J2000RA = deprecessedPoint.ra();
J2000DE = deprecessedPoint.dec();
ks->flagManager()->setRaDec(J2000RA, J2000DE);
void SkyMap::slotEditFlag( int flagIdx ) {
Supports Markdown
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