summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-22 12:14:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-22 12:14:06 -0700
commit63b6f7d5a25967f003a734d2058a73b4b13e8387 (patch)
tree0f5d68199afacaa04bd2bac7029fc08e42db18c5 /qt-ui/maintab.cpp
parent9c3b512701c59955350f317eb6d19e6fdc93f546 (diff)
parent134e20bdc27f63c73ef8257dc357ae05642fece8 (diff)
downloadsubsurface-63b6f7d5a25967f003a734d2058a73b4b13e8387.tar.gz
Merge branch 'comboBoxDelegate' of https://github.com/tcanabrava/subsurface
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index c172deeea..4be27426c 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -6,8 +6,6 @@
*/
#include "maintab.h"
#include "ui_maintab.h"
-#include "addcylinderdialog.h"
-#include "addweightsystemdialog.h"
#include "mainwindow.h"
#include "../helpers.h"
#include "../statistics.h"
@@ -290,21 +288,7 @@ void MainTab::updateDiveInfo(int dive)
void MainTab::addCylinder_clicked()
{
- if (cylindersModel->rowCount() >= MAX_CYLINDERS)
- return;
-
- AddCylinderDialog dialog(this);
- cylinder_t newCylinder;
- newCylinder.type.description = "";
-
- dialog.setCylinder(&newCylinder);
- int result = dialog.exec();
- if (result == QDialog::Rejected) {
- return;
- }
-
- dialog.updateCylinder();
- cylindersModel->add(&newCylinder);
+ cylindersModel->add();
}
void MainTab::on_editCylinder_clicked()
@@ -317,21 +301,7 @@ void MainTab::on_delCylinder_clicked()
void MainTab::addWeight_clicked()
{
- if (weightModel->rowCount() >= MAX_WEIGHTSYSTEMS)
- return;
-
- AddWeightsystemDialog dialog(this);
- weightsystem_t newWeightsystem;
- newWeightsystem.description = "";
- newWeightsystem.weight.grams = 0;
-
- dialog.setWeightsystem(&newWeightsystem);
- int result = dialog.exec();
- if (result == QDialog::Rejected)
- return;
-
- dialog.updateWeightsystem();
- weightModel->add(&newWeightsystem);
+ weightModel->add();
}
void MainTab::on_editWeight_clicked()