--- a/QTfrontend/ui/page/pagedata.cpp Thu Apr 26 07:44:44 2012 +0200
+++ b/QTfrontend/ui/page/pagedata.cpp Thu Apr 26 09:47:35 2012 +0200
@@ -30,6 +30,7 @@
#include "pagedata.h"
#include "databrowser.h"
#include "hwconsts.h"
+#include "DataManager.h"
#include "quazip.h"
#include "quazipfile.h"
@@ -52,6 +53,7 @@
void PageDataDownload::connectSignals()
{
connect(web, SIGNAL(anchorClicked(QUrl)), this, SLOT(request(const QUrl&)));
+ connect(this, SIGNAL(goBack()), this, SLOT(onPageLeave()));
}
PageDataDownload::PageDataDownload(QWidget* parent) : AbstractPage(parent)
@@ -60,6 +62,8 @@
web->setOpenLinks(false);
// fetchList();
+
+ m_contentDownloaded = false;
}
void PageDataDownload::request(const QUrl &url)
@@ -217,6 +221,8 @@
qWarning("read all but not EOF");
return false;
}
+
+ m_contentDownloaded = true;
}
file.close();
@@ -232,3 +238,13 @@
return true;
}
+
+
+void PageDataDownload::onPageLeave()
+{
+ if (m_contentDownloaded)
+ {
+ m_contentDownloaded = false;
+ DataManager::instance().reload();
+ }
+}