mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Implement hook up autogroup menu
This tracks the autogroup state remembered in data files. Toggling the checkable menu item causes the divelist to be marked as changed. This might actually be untrue - but that's really hard to track so this is the "better safe than sorry" approach. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8f623c2c72
commit
8259b1a59a
2 changed files with 18 additions and 7 deletions
|
@ -287,7 +287,13 @@ void MainWindow::on_actionRenumber_triggered()
|
||||||
|
|
||||||
void MainWindow::on_actionAutoGroup_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()
|
void MainWindow::on_actionToggleZoom_triggered()
|
||||||
|
@ -802,6 +808,7 @@ void MainWindow::loadFiles(const QStringList fileNames)
|
||||||
ui.ListWidget->setFocus();
|
ui.ListWidget->setFocus();
|
||||||
WSInfoModel *wsim = WSInfoModel::instance();
|
WSInfoModel *wsim = WSInfoModel::instance();
|
||||||
wsim->updateInfo();
|
wsim->updateInfo();
|
||||||
|
ui.actionAutoGroup->setChecked(autogroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionImportCSV_triggered()
|
void MainWindow::on_actionImportCSV_triggered()
|
||||||
|
|
|
@ -169,7 +169,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>763</width>
|
<width>763</width>
|
||||||
<height>23</height>
|
<height>32</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
|
@ -344,6 +344,9 @@
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAutoGroup">
|
<action name="actionAutoGroup">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Auto Group</string>
|
<string>Auto Group</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -443,11 +446,12 @@
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionImportCSV">
|
<action name="actionImportCSV">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Import CSV</string>
|
<string>Import CSV</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
</property>
|
<string>Import CSV</string>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|
Loading…
Add table
Reference in a new issue