Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-02-06 21:25:44 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:11:49 +0300
commit58b0bd4baf4e393f3163448add27b2a4ec1922a1 (patch)
tree3c935bf15a840f55ada93517f85bcb3fd07f2e44 /qt/update_dialog.cpp
parent9b164728dc52e1203d5e0836428233046f87800f (diff)
Download Dialog now saves it's state after closing
Diffstat (limited to 'qt/update_dialog.cpp')
-rw-r--r--qt/update_dialog.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/qt/update_dialog.cpp b/qt/update_dialog.cpp
index 3cf0a53433..7a51c6a8b3 100644
--- a/qt/update_dialog.cpp
+++ b/qt/update_dialog.cpp
@@ -73,18 +73,6 @@ namespace qt
setWindowTitle(tr("Geographical Regions"));
resize(600, 500);
-
- // we want to receive all download progress and result events
- m_storage.Subscribe(boost::bind(&UpdateDialog::OnCountryChanged, this, _1),
- boost::bind(&UpdateDialog::OnCountryDownloadProgress, this, _1, _2),
- boost::bind(&UpdateDialog::OnUpdateCheck, this, _1, _2));
- FillTree();
- }
-
- UpdateDialog::~UpdateDialog()
- {
- // tell download manager that we're gone...
- m_storage.Unsubscribe();
}
/// when user clicks on any map row in the table
@@ -328,4 +316,17 @@ namespace qt
item->setText(KColumnIndexSize, QString("%1%").arg(progress.first * 100 / progress.second));
}
+ void UpdateDialog::ShowDialog()
+ {
+ // we want to receive all download progress and result events
+ m_storage.Subscribe(boost::bind(&UpdateDialog::OnCountryChanged, this, _1),
+ boost::bind(&UpdateDialog::OnCountryDownloadProgress, this, _1, _2),
+ boost::bind(&UpdateDialog::OnUpdateCheck, this, _1, _2));
+ // if called for first time
+ if (!m_tree->topLevelItemCount())
+ FillTree();
+
+ exec();
+ }
+
}