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

Prakash Mohan prak902000 at gmail.com
Sun Jun 28 00:23:26 CEST 2009


SVN commit 988364 by prakash:

Fixing another bug in the image preview, check was not done to see the existance of the temp images.

CCMAIL: kstars-devel at kde.org


 M  +8 -2      observinglist.cpp  


--- branches/kstars/summer/kstars/kstars/tools/observinglist.cpp #988363:988364
@@ -521,8 +521,10 @@
             if( QFile::exists( KStandardDirs::locateLocal( "appdata", CurrentImage ) ) ) {//If the image is present, show it!
                 ui->ImagePreview->showPreview( KUrl( KStandardDirs::locateLocal( "appdata", CurrentImage ) ));
                 ui->ImagePreview->show();
+            } else if( QFile::exists( KStandardDirs::locateLocal( "appdata", "Temp_" + CurrentImage ) ) ) {
+                ui->ImagePreview->showPreview( KUrl( KStandardDirs::locateLocal( "appdata","Temp_" + CurrentImage ) ));
+                ui->ImagePreview->show();
             }
-
         } else {
             kDebug() << i18n( "Object %1 not found in list.", newName );
         } 
@@ -1263,7 +1265,11 @@
     }
 }
 void ObservingList::slotImageViewer() {
-    ImageViewer *iv = new ImageViewer( KStandardDirs::locateLocal( "appdata", CurrentImage ) );
+    ImageViewer *iv;
+    if( QFile::exists( KStandardDirs::locateLocal( "appdata", CurrentImage ) ) )
+        iv = new ImageViewer( KStandardDirs::locateLocal( "appdata", CurrentImage ) );
+    else if( QFile::exists( KStandardDirs::locateLocal( "appdata", "Temp_" + CurrentImage ) ) )
+        iv = new ImageViewer( KStandardDirs::locateLocal( "appdata", "Temp_" + CurrentImage ) );
     ivList.append( iv );
     iv->show();
 }


More information about the Kstars-devel mailing list