profile: automatically enter edit mode

The edit mode was hidden in a context-menu. With fine-grained
undo there seems to be no need to explicitly exit edit mode.

Therefore, always switch to edit mode when displaying a
manually added dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-03-11 21:45:46 +01:00
parent 63664061eb
commit dea58bd67c
4 changed files with 13 additions and 16 deletions

View file

@ -589,9 +589,6 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
changeMode->addAction(gettextFromC::tr(divemode_text_ui[PSCR]),
[this, seconds](){ addDivemodeSwitch(seconds, PSCR); });
if (same_string(get_dive_dc_const(d, dc)->model, "manually added dive") || !get_dive_dc_const(d, dc)->samples)
m.addAction(tr("Edit the profile"), this, &ProfileWidget2::editCurrentDive);
if (DiveEventItem *item = dynamic_cast<DiveEventItem *>(sceneItem)) {
m.addAction(tr("Remove event"), [this,item] { removeEvent(item); });
m.addAction(tr("Hide similar events"), [this, item] { hideEvents(item); });