diff options
-rw-r--r-- | qt-ui/mainwindow.cpp | 9 | ||||
-rw-r--r-- | qt-ui/mainwindow.ui | 16 |
2 files changed, 18 insertions, 7 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index d9019fa00..72dc1a00e 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -287,7 +287,13 @@ void MainWindow::on_actionRenumber_triggered() void MainWindow::on_actionAutoGroup_triggered() { - qDebug("actionAutoGroup"); + autogroup = ui.actionAutoGroup->isChecked(); + if (autogroup) + autogroup_dives(); + else + remove_autogen_trips(); + refreshDisplay(); + mark_divelist_changed(true); } void MainWindow::on_actionToggleZoom_triggered() @@ -802,6 +808,7 @@ void MainWindow::loadFiles(const QStringList fileNames) ui.ListWidget->setFocus(); WSInfoModel *wsim = WSInfoModel::instance(); wsim->updateInfo(); + ui.actionAutoGroup->setChecked(autogroup); } void MainWindow::on_actionImportCSV_triggered() diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 8a108118e..ffe55c1f9 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -169,7 +169,7 @@ <x>0</x> <y>0</y> <width>763</width> - <height>23</height> + <height>32</height> </rect> </property> <widget class="QMenu" name="menuFile"> @@ -344,6 +344,9 @@ </property> </action> <action name="actionAutoGroup"> + <property name="checkable"> + <bool>true</bool> + </property> <property name="text"> <string>Auto Group</string> </property> @@ -443,11 +446,12 @@ </property> </action> <action name="actionImportCSV"> - <property name="text"> - <string>Import CSV</string> - </property> - <property name="toolTip"> - </property> + <property name="text"> + <string>Import CSV</string> + </property> + <property name="toolTip"> + <string>Import CSV</string> + </property> </action> </widget> <customwidgets> |