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

Prakash Mohan prak902000 at gmail.com
Fri Jun 5 14:24:52 CEST 2009


SVN commit 977775 by prakash:

Enabling the Get Image button even when the image exists so that user can update the image if any need arises.

CCMAIL: kstars-devel at kde.org


 M  +3 -3      observinglist.cpp  


--- branches/kstars/summer/kstars/kstars/tools/observinglist.cpp #977774:977775
@@ -506,8 +506,7 @@
             CurrentImage = RAString + DecString;
             if(QFile::exists( KStandardDirs::locateLocal( "appdata", CurrentImage ) ) )
                 ui->ImagePreview->showPreview( KUrl( KStandardDirs::locateLocal( "appdata", CurrentImage ) ));
-            else
-                ui->GetImage->setEnabled( true );
+            ui->GetImage->setEnabled( true );
 
             if ( newName != i18n( "star" ) ) {
                 //Display the current object's user notes in the NotesEdit
@@ -1202,12 +1201,13 @@
 }
 
 void ObservingList::slotGetImage() {
+    ui->ImagePreview->clearPreview();
     QString URLprefix( "http://archive.stsci.edu/cgi-bin/dss_search?v=1" );
     QString URLsuffix( "&e=J2000&h=15.0&w=15.0&f=gif&c=none&fov=NONE" );
     KUrl url (URLprefix + "&r=" + RAString + "&d=" + DecString + URLsuffix);
+    QFile::remove( KStandardDirs::locateLocal( "appdata", CurrentImage ) );
     downloadJob = KIO::copy (url, KUrl( KStandardDirs::locateLocal( "appdata", CurrentImage ) ) );
     connect (downloadJob, SIGNAL (result (KJob *)), SLOT (downloadReady (KJob *)));
-    
 }
 
 void ObservingList::downloadReady (KJob *job)


More information about the Kstars-devel mailing list