Show divemode swith options only for rebreather dives
The dive profile context menu gets rather long with three additional divome switches that can be selected. This is now changed so that the additional options are only shown when in CCR or in PSCR divemode. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
This commit is contained in:
parent
e46cb2f800
commit
718f9811b7
@ -1413,12 +1413,14 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
|
||||
setpointAction->setData(event->globalPos());
|
||||
QAction *action = m.addAction(tr("Add bookmark"), this, SLOT(addBookmark()));
|
||||
action->setData(event->globalPos());
|
||||
QAction *OCAction = m.addAction(tr("Add OC switch"), this, SLOT(addOCSwitch()));
|
||||
OCAction->setData(event->globalPos());
|
||||
QAction *CCRAction = m.addAction(tr("Add CCR switch"), this, SLOT(addCCRSwitch()));
|
||||
CCRAction->setData(event->globalPos());
|
||||
QAction *PSCRAction = m.addAction(tr("Add PSCR switch"), this, SLOT(addPSCRSwitch()));
|
||||
PSCRAction->setData(event->globalPos());
|
||||
if(current_dc->divemode) {
|
||||
QAction *OCAction = m.addAction(tr("Add OC switch"), this, SLOT(addOCSwitch()));
|
||||
OCAction->setData(event->globalPos());
|
||||
QAction *CCRAction = m.addAction(tr("Add CCR switch"), this, SLOT(addCCRSwitch()));
|
||||
CCRAction->setData(event->globalPos());
|
||||
QAction *PSCRAction = m.addAction(tr("Add PSCR switch"), this, SLOT(addPSCRSwitch()));
|
||||
PSCRAction->setData(event->globalPos());
|
||||
}
|
||||
|
||||
if (same_string(current_dc->model, "manually added dive"))
|
||||
m.addAction(tr("Edit the profile"), this, SIGNAL(editCurrentDive()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user