From db44045cfea21510415ef53b27895cc0770312a7 Mon Sep 17 00:00:00 2001 From: Danilo Cesar Lemes de Paula Date: Thu, 22 Aug 2013 17:58:39 -0300 Subject: 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 --- qt-ui/diveplanner.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qt-ui') 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))); -- cgit v1.2.3-70-g09d2