summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 5d282fd95..157ab9fcd 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -1436,8 +1436,10 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
// create menu to show when right clicking on dive computer name
if (dc_number > 0)
m.addAction(tr("Make first dive computer"), this, SLOT(makeFirstDC()));
- if (count_divecomputers() > 1)
+ if (count_divecomputers() > 1) {
m.addAction(tr("Delete this dive computer"), this, SLOT(deleteCurrentDC()));
+ m.addAction(tr("Split this dive computer into own dive"), this, SLOT(splitCurrentDC()));
+ }
m.exec(event->globalPos());
// don't show the regular profile context menu
return;
@@ -1581,6 +1583,11 @@ void ProfileWidget2::deleteCurrentDC()
emit refreshDisplay(true);
}
+void ProfileWidget2::splitCurrentDC()
+{
+ Command::splitDiveComputer(current_dive, dc_number);
+}
+
void ProfileWidget2::makeFirstDC()
{
make_first_dc();