mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Stub out a mark dive invalid function
Not sure I'll be able to finish this for 4.0 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
93b5c0cd14
commit
df464fcef1
2 changed files with 31 additions and 1 deletions
|
@ -622,6 +622,31 @@ void DiveListView::addToTripAbove()
|
|||
fixMessyQtModelBehaviour();
|
||||
}
|
||||
|
||||
void DiveListView::markDiveInvalid()
|
||||
{
|
||||
int i;
|
||||
struct dive *d = (struct dive *) contextMenuIndex.data(DiveTripModel::DIVE_ROLE).value<void*>();
|
||||
if (!d)
|
||||
return;
|
||||
for_each_dive (i, d) {
|
||||
if (!d->selected)
|
||||
continue;
|
||||
// now mark the dive invalid... how do we do THAT?
|
||||
// d->invalid = true;
|
||||
}
|
||||
if (amount_selected == 0) {
|
||||
mainWindow()->cleanUpEmpty();
|
||||
}
|
||||
mark_divelist_changed(TRUE);
|
||||
mainWindow()->refreshDisplay();
|
||||
if(prefs.display_invalid_dives == FALSE) {
|
||||
clearSelection();
|
||||
// select top dive that isn't marked invalid
|
||||
rememberSelection();
|
||||
}
|
||||
fixMessyQtModelBehaviour();
|
||||
}
|
||||
|
||||
void DiveListView::deleteDive()
|
||||
{
|
||||
int i;
|
||||
|
@ -690,8 +715,12 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
|
|||
popup.addAction(tr("merge trip with trip below"), this, SLOT(mergeTripBelow()));
|
||||
}
|
||||
}
|
||||
if (d)
|
||||
if (d) {
|
||||
popup.addAction(tr("delete dive(s)"), this, SLOT(deleteDive()));
|
||||
#if 0
|
||||
popup.addAction(tr("mark dive(s) invalid", this, SLOT(markDiveInvalid())));
|
||||
#endif
|
||||
}
|
||||
if (amount_selected > 1 && consecutive_selected())
|
||||
popup.addAction(tr("merge selected dives"), this, SLOT(mergeDives()));
|
||||
if (amount_selected >= 1) {
|
||||
|
|
|
@ -38,6 +38,7 @@ public slots:
|
|||
void showSearchEdit();
|
||||
void removeFromTrip();
|
||||
void deleteDive();
|
||||
void markDiveInvalid();
|
||||
void testSlot();
|
||||
void fixMessyQtModelBehaviour();
|
||||
void mergeTripAbove();
|
||||
|
|
Loading…
Add table
Reference in a new issue