mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Profile context menu: trigger editing of manually added dive
Right now the way to edit the profile of a manually added dive is really counterintuitive: you have to first make some random change to the dive information, then the profile switches in to editing mode. This commit adds a simple context menu entry on the profile that is only shown when the a manually added dive is displayed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
59f283a4fc
commit
bbfa2b655b
1 changed files with 4 additions and 0 deletions
|
@ -1222,6 +1222,10 @@ void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
|
|||
setpointAction->setData(event->globalPos());
|
||||
QAction *action = m.addAction(tr("Add bookmark"), this, SLOT(addBookmark()));
|
||||
action->setData(event->globalPos());
|
||||
|
||||
if (same_string(current_dc->model, "manually added dive"))
|
||||
QAction *editProfileAction = m.addAction(tr("Edit the profile"), MainWindow::instance(), SLOT(editCurrentDive()));
|
||||
|
||||
if (DiveEventItem *item = dynamic_cast<DiveEventItem *>(sceneItem)) {
|
||||
action = new QAction(&m);
|
||||
action->setText(tr("Remove event"));
|
||||
|
|
Loading…
Reference in a new issue