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>
This commit is contained in:
Danilo Cesar Lemes de Paula 2013-08-22 17:58:39 -03:00
parent 1e69731804
commit db44045cfe

View file

@ -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)));