mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Adds unhide to profile menu context menu
Unhide menu is only shown when hidden events exist. Also updates relavent manual section. Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
77c2c4c5ad
commit
ecc33e6375
3 changed files with 22 additions and 1 deletions
|
@ -161,6 +161,17 @@ void ProfileGraphicsView::contextMenuEvent(QContextMenuEvent* event)
|
|||
m.addAction(action);
|
||||
break;
|
||||
}
|
||||
bool some_hidden = false;
|
||||
for (int i = 0; i < evn_used; i++) {
|
||||
if (ev_namelist[i].plot_ev == false) {
|
||||
some_hidden = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (some_hidden) {
|
||||
action = m.addAction(tr("Unhde all events"), this, SLOT(unhideEvents()));
|
||||
action->setData(event->globalPos());
|
||||
}
|
||||
m.exec(event->globalPos());
|
||||
}
|
||||
|
||||
|
@ -213,6 +224,15 @@ void ProfileGraphicsView::hideEvents()
|
|||
}
|
||||
}
|
||||
|
||||
void ProfileGraphicsView::unhideEvents()
|
||||
{
|
||||
QAction *action = qobject_cast<QAction*>(sender());
|
||||
for (int i = 0; i < evn_used; i++) {
|
||||
ev_namelist[i].plot_ev = true;
|
||||
}
|
||||
plot(current_dive, TRUE);
|
||||
}
|
||||
|
||||
void ProfileGraphicsView::removeEvent()
|
||||
{
|
||||
QAction *action = qobject_cast<QAction*>(sender());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue