summaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Sander Kleijwegt <sander@myowndomain.nl>2015-09-04 12:23:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-12 08:28:13 -0700
commit6427564d33caf59a85e6521366afc5e82fefa5fd (patch)
tree39acb8085a07e306bc3a2e0de8baedc527b12842 /qt-ui/locationinformation.cpp
parent8dafc32228fab06ae01b0f5cfe43cda6ea74f714 (diff)
downloadsubsurface-6427564d33caf59a85e6521366afc5e82fefa5fd.tar.gz
Hide current dive site from dive sites with same coordinates.
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r--qt-ui/locationinformation.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index dbc22b178..bf8300426 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -55,13 +55,11 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo
bool LocationInformationWidget::eventFilter(QObject*, QEvent *ev)
{
if( ev->type() == QEvent::ContextMenu ) {
- if (ui.diveSiteListView->selectionModel()->selectedIndexes().count() >= 2) {
- QContextMenuEvent *ctx = (QContextMenuEvent*) ev;
- QMenu contextMenu;
- contextMenu.addAction(tr("Merge dive Sites"), this, SLOT(mergeSelectedDiveSites()));
- contextMenu.exec(ctx->globalPos());
- return true;
- }
+ QContextMenuEvent *ctx = (QContextMenuEvent*) ev;
+ QMenu contextMenu;
+ contextMenu.addAction(tr("Merge into current site"), this, SLOT(mergeSelectedDiveSites()));
+ contextMenu.exec(ctx->globalPos());
+ return true;
}
return false;
}