diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelistview.cpp | 14 | ||||
-rw-r--r-- | qt-ui/divelistview.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 90d0b4627..51720a317 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -616,6 +616,19 @@ void DiveListView::mergeDives() MainWindow::instance()->refreshDisplay(); } +void DiveListView::splitDives() +{ + int i; + struct dive *dive; + + for_each_dive (i, dive) { + if (dive->selected) + split_dive(dive); + } + MainWindow::instance()->refreshProfile(); + MainWindow::instance()->refreshDisplay(); +} + void DiveListView::renumberDives() { RenumberDialog::instance()->renumberOnlySelected(); @@ -882,6 +895,7 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) if (amount_selected >= 1) { popup.addAction(tr("Renumber dive(s)"), this, SLOT(renumberDives())); popup.addAction(tr("Shift dive times"), this, SLOT(shiftTimes())); + popup.addAction(tr("Split selected dives"), this, SLOT(splitDives())); popup.addAction(tr("Load image(s) from file(s)"), this, SLOT(loadImages())); popup.addAction(tr("Load image(s) from web"), this, SLOT(loadWebImages())); } diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h index 42802b6ea..aaec37af5 100644 --- a/qt-ui/divelistview.h +++ b/qt-ui/divelistview.h @@ -49,6 +49,7 @@ slots: void addToTripAbove(); void addToTripBelow(); void mergeDives(); + void splitDives(); void renumberDives(); void shiftTimes(); void loadImages(); |