diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-06-28 15:12:09 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-06-28 20:24:14 +0800 |
commit | fb4dcbc685b3668be2428d60ed978940e3392908 (patch) | |
tree | cc4bede6a836def896db7839f51f40648a89dad0 | |
parent | 880b8394d2b063c1bbd6597c2cb6c51f0a1d66c1 (diff) | |
download | subsurface-fb4dcbc685b3668be2428d60ed978940e3392908.tar.gz |
A couple of dialog modality considerations
While most dialogs can be open and the main application window
can still be accessed, certain should possibly be modal
in these terms.
This patch proposes the download from webservice and DC dialogs
to lock the main application window until they are closed, with
the consideration of preventing eventual unexpected behavior
in the divelist if both dialogs are active at the same time.
To solve that QtDialog::exec() is used instead of
QtWidget::show().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/downloadfromdivecomputer.cpp | 2 | ||||
-rw-r--r-- | qt-ui/subsurfacewebservices.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp index ba079e6dd..65e7a16e2 100644 --- a/qt-ui/downloadfromdivecomputer.cpp +++ b/qt-ui/downloadfromdivecomputer.cpp @@ -66,7 +66,7 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget* parent, Qt::WindowFlags f) : void DownloadFromDCWidget::runDialog() { ui->progressBar->hide(); - show(); + exec(); } void DownloadFromDCWidget::stoppedDownloading() diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 76e730be6..cdf8ee6c8 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -139,7 +139,7 @@ void SubsurfaceWebServices::setStatusText(int status) void SubsurfaceWebServices::runDialog() { - show(); + exec(); } /* requires that there is a <download> or <error> tag under the <root> tag */ |