From 466f160c01127c1a2aad37742f53a9a0b97eb274 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Tue, 11 Mar 2014 18:30:58 +0200 Subject: Profile2: provide means to disable the tool buttons Once the poster is displayed when there are no dives in the list, we may also want to disable the QToolButtons (PO2, SAC, etc..), until a new dive is loaded and the profile is redrawn. Signed-off-by: Lubomir I. Ivanov Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui/profile') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 822f1bc7f..d03d0dc83 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -544,6 +544,7 @@ void ProfileWidget2::setEmptyState() dataModel->clear(); currentState = EMPTY; + MainWindow::instance()->setToolButtonsEnabled(false); backgroundFile = QString(":poster"); fixBackgroundPos(); @@ -577,6 +578,7 @@ void ProfileWidget2::setProfileState() return; currentState = PROFILE; + MainWindow::instance()->setToolButtonsEnabled(true); toolTipItem->readPos(); setBackgroundBrush(getColor(::BACKGROUND)); -- cgit v1.2.3-70-g09d2