[Kstars-devel] branches/kstars/summer/kstars/kstars/tools

Prakash Mohan prak902000 at gmail.com
Sun Jun 7 21:20:56 CEST 2009


SVN commit 978649 by prakash:

Disabling the DSS/SDSS image in Observing List for the unnamed object, this makes it much easier to save the images with unique names.

CCMAIL: kstars-devel at kde.org


 M  +13 -12    observinglist.cpp  


--- branches/kstars/summer/kstars/kstars/tools/observinglist.cpp #978648:978649
@@ -468,18 +468,6 @@
         if ( found ) {
             m_CurrentObject = o;
             plot( o );
-            //Change the RAString, DecString, CurrentImage to correspond to the new object
-            RAString = RAString.sprintf( "%02d+%02d+%02d", o->ra0()->hour(), o->ra0()->minute(), o->ra0()->second() );
-            decsgn = '+';
-            if ( o->dec0()->Degrees() < 0.0 ) decsgn = '-';
-            int dd = abs( o->dec0()->degree() );
-            int dm = abs( o->dec0()->arcmin() );
-            int ds = abs( o->dec0()->arcsec() );
-            DecString = DecString.sprintf( "%c%02d+%02d+%02d", decsgn, dd, dm, ds );
-            CurrentImage ="dss_" + o->name().remove(' ') ;
-            if( QFile::exists( KStandardDirs::locateLocal( "appdata", CurrentImage ) ) )//If the image is present, show it!
-                ui->ImagePreview->showPreview( KUrl( KStandardDirs::locateLocal( "appdata", CurrentImage ) ));
-            ui->GetImage->setEnabled( true );//Enable anyway for updating the image
             if ( newName != i18n( "star" ) ) {
                 //Display the current object's user notes in the NotesEdit
                 //First, save the last object's user log to disk, if necessary
@@ -489,6 +477,18 @@
                 ui->NotesLabel->setEnabled( true );
                 ui->NotesEdit->setEnabled( true );
                 ui->NotesLabel->setText( i18n( "observing notes for %1:", LogObject->translatedName() ) );
+                //Change the RAString, DecString, CurrentImage to correspond to the new object
+                RAString = RAString.sprintf( "%02d+%02d+%02d", o->ra0()->hour(), o->ra0()->minute(), o->ra0()->second() );
+                decsgn = '+';
+                if ( o->dec0()->Degrees() < 0.0 ) decsgn = '-';
+                int dd = abs( o->dec0()->degree() );
+                int dm = abs( o->dec0()->arcmin() );
+                int ds = abs( o->dec0()->arcsec() );
+                DecString = DecString.sprintf( "%c%02d+%02d+%02d", decsgn, dd, dm, ds );
+                CurrentImage ="dss_" + o->name().remove(' ') ;
+                if( QFile::exists( KStandardDirs::locateLocal( "appdata", CurrentImage ) ) )//If the image is present, show it!
+                    ui->ImagePreview->showPreview( KUrl( KStandardDirs::locateLocal( "appdata", CurrentImage ) ));
+                ui->GetImage->setEnabled( true );//Enable anyway for updating the image
                 if ( LogObject->userLog().isEmpty() ) {
                     ui->NotesEdit->setPlainText( i18n( "Record here observation logs and/or data on %1.", LogObject->translatedName() ) );
                 } else {
@@ -506,6 +506,7 @@
                 ui->NotesLabel->setEnabled( false );
                 ui->NotesEdit->clear();
                 ui->NotesEdit->setEnabled( false );
+                ui->GetImage->setEnabled( false );//Disabled for unnamed object
             }
         } else {
             kDebug() << i18n( "Object %1 not found in list.", newName );


More information about the Kstars-devel mailing list