aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r--qt-ui/profilegraphics.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 19fe81d91..2db6d9009 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -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());