diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-11-21 05:11:41 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-21 05:13:18 -0800 |
commit | 58088d589714d4e114bd84a98f27dc4625eb48bb (patch) | |
tree | ac14236ab633a86a6244d8bbd1a00b8e11660d5c | |
parent | 33b15ea906bb776511b0109ac3b1fa8daf959764 (diff) | |
download | subsurface-58088d589714d4e114bd84a98f27dc4625eb48bb.tar.gz |
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 <dirk@hohndel.org>
-rw-r--r-- | qt-ui/profilegraphics.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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() |