summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-07-19 20:49:30 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-07-19 20:49:30 (GMT)
commit5898796c69a0067d078ad464a053739e2d2c8bd0 (patch)
tree59be7d1c84ddf91ed77be83def3f1876eb8a2185
parentb462fde893330f4f13628d7205c7a3f130a08a6e (diff)
Remember last opened URL
-rw-r--r--kstars/fitsviewer/fitsviewer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/kstars/fitsviewer/fitsviewer.cpp b/kstars/fitsviewer/fitsviewer.cpp
index 729a60d..9b7351e 100644
--- a/kstars/fitsviewer/fitsviewer.cpp
+++ b/kstars/fitsviewer/fitsviewer.cpp
@@ -73,6 +73,8 @@ FITSViewer::FITSViewer (QWidget *parent)
debayerDialog= NULL;
markStars = false;
+ lastURL = QUrl(QDir::homePath());
+
fitsTab->setTabsClosable(true);
setWindowIcon(QIcon::fromTheme("kstars_fitsviewer"));
@@ -254,7 +256,6 @@ void FITSViewer::showEvent(QShowEvent * /*event*/)
int FITSViewer::addFITS(const QUrl *imageName, FITSMode mode, FITSScale filter, const QString &previewText, bool silent)
{
-
FITSTab *tab = new FITSTab(this);
led.setColor(Qt::yellow);
@@ -275,6 +276,8 @@ int FITSViewer::addFITS(const QUrl *imageName, FITSMode mode, FITSScale filter,
return -1;
}
+ lastURL = QUrl(imageName->url(QUrl::RemoveFilename));
+
QApplication::restoreOverrideCursor();
tab->setPreviewText(previewText);