summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>2013-08-22 17:58:39 -0300
committerGravatar Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>2013-08-25 19:03:43 -0300
commitdb44045cfea21510415ef53b27895cc0770312a7 (patch)
treed8a4f2ed1f10be7fc514c0f573371d2c4f8b1a4c
parent1e6973180403e513c6c9469ec92751f083f5ff3c (diff)
downloadsubsurface-db44045cfea21510415ef53b27895cc0770312a7.tar.gz
fixing planner's gas dialog
Before this commit this dialog had a weird behavior in which when it was shown, the whole screen was still active. In case of a alt+tab, this dialog is sent to behind the application window, but still visible in the task bar. This commit basically changes this behavior to a regular pop-up. Signed-off-by: Danilo Cesar Lemes de Paula <danilo.cesar@collabora.co.uk>
-rw-r--r--qt-ui/diveplanner.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 95b6c211c..39d3b20a8 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -142,9 +142,10 @@ DivePlannerGraphics::DivePlannerGraphics(QWidget* parent): QGraphicsView(parent)
// Prepare the stuff for the gas-choices.
gasChoices = new QStringListModel(QStringList() << tr("AIR") << tr("EAN32") << tr("EAN36"));
- gasListView = new QListView();
- gasListView->setWindowFlags(Qt::FramelessWindowHint);
+ gasListView = new QListView(this);
+ gasListView->setWindowFlags(Qt::FramelessWindowHint | Qt::Popup);
gasListView->setModel(gasChoices);
+ gasListView->setWindowModality(Qt::WindowModal);
gasListView->hide();
connect(gasListView, SIGNAL(activated(QModelIndex)), this, SLOT(selectGas(QModelIndex)));