From 58088d589714d4e114bd84a98f27dc4625eb48bb Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 21 Nov 2013 05:11:41 -0800 Subject: Complete add bookmark for the profile context menu This (together with the commits fixing the QMessageBox title) should finally close all the issues in bug 250. Fixes #250 Signed-off-by: Dirk Hohndel --- qt-ui/profilegraphics.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp index 7a5630799..3e7cff237 100644 --- a/qt-ui/profilegraphics.cpp +++ b/qt-ui/profilegraphics.cpp @@ -158,7 +158,10 @@ void ProfileGraphicsView::addBookmark() QPoint globalPos = action->data().toPoint(); QPoint viewPos = mapFromGlobal(globalPos); QPointF scenePos = mapToScene(viewPos); - qDebug() << "Add Bookmark"; + int seconds = scenePos.x() / gc.maxx * (gc.rightx - gc.leftx) + gc.leftx; + add_event(current_dc, seconds, SAMPLE_EVENT_BOOKMARK, 0, 0, "bookmark"); + mark_divelist_changed(TRUE); + plot(current_dive, TRUE); } void ProfileGraphicsView::changeGas() -- cgit v1.2.3-70-g09d2