summaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-06-04 00:18:25 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-03 21:42:00 -0700
commit9c34f196fa0b0ccf750cc045d8d1fabe35b17e91 (patch)
treeac0f53338895b944a114ffa13cdddf4ba544e151 /qt-ui/locationinformation.cpp
parentefeca584746da69ed3e798a2659f6bd1b6426f79 (diff)
downloadsubsurface-9c34f196fa0b0ccf750cc045d8d1fabe35b17e91.tar.gz
Fix the message buttons in dive_site_edit
Some button management operations where unnecessary. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r--qt-ui/locationinformation.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 198d7f6a0..06475aae0 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -13,11 +13,6 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
{
ui.setupUi(this);
ui.diveSiteMessage->setCloseButtonVisible(false);
- ui.diveSiteMessage->show();
-
- // create the three buttons and only show the close button for now
- closeAction = new QAction(tr("Close"), this);
- connect(closeAction, SIGNAL(triggered(bool)), this, SLOT(rejectChanges()));
acceptAction = new QAction(tr("Apply changes"), this);
connect(acceptAction, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
@@ -26,7 +21,8 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
connect(rejectAction, SIGNAL(triggered(bool)), this, SLOT(rejectChanges()));
ui.diveSiteMessage->setText(tr("Dive site management"));
- ui.diveSiteMessage->addAction(closeAction);
+ ui.diveSiteMessage->addAction(acceptAction);
+ ui.diveSiteMessage->addAction(rejectAction);
connect(this, SIGNAL(startFilterDiveSite(uint32_t)), MultiFilterSortModel::instance(), SLOT(startFilterDiveSite(uint32_t)));
connect(this, SIGNAL(stopFilterDiveSite()), MultiFilterSortModel::instance(), SLOT(stopFilterDiveSite()));
@@ -153,10 +149,6 @@ void LocationInformationWidget::resetState()
MainWindow::instance()->dive_list()->setEnabled(true);
MainWindow::instance()->setEnabledToolbar(true);
ui.diveSiteMessage->setText(tr("Dive site management"));
- ui.diveSiteMessage->addAction(closeAction);
- ui.diveSiteMessage->removeAction(acceptAction);
- ui.diveSiteMessage->removeAction(rejectAction);
- ui.diveSiteMessage->setCloseButtonVisible(false);
}
void LocationInformationWidget::enableEdition()
@@ -164,10 +156,6 @@ void LocationInformationWidget::enableEdition()
MainWindow::instance()->dive_list()->setEnabled(false);
MainWindow::instance()->setEnabledToolbar(false);
ui.diveSiteMessage->setText(tr("You are editing a dive site"));
- ui.diveSiteMessage->removeAction(closeAction);
- ui.diveSiteMessage->addAction(acceptAction);
- ui.diveSiteMessage->addAction(rejectAction);
- ui.diveSiteMessage->setCloseButtonVisible(false);
if (!currentDs) {
displayed_dive.dive_site_uuid = create_dive_site(NULL);
currentDs = get_dive_site_by_uuid(displayed_dive.dive_site_uuid);