From 6427564d33caf59a85e6521366afc5e82fefa5fd Mon Sep 17 00:00:00 2001 From: Sander Kleijwegt Date: Fri, 4 Sep 2015 12:23:19 +0200 Subject: Hide current dive site from dive sites with same coordinates. Signed-off-by: Sander Kleijwegt Signed-off-by: Dirk Hohndel --- qt-ui/locationinformation.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'qt-ui/locationinformation.cpp') 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; } -- cgit v1.2.3-70-g09d2