# # # patch "src/view/TreeView.cpp" # from [5b4f86399682825dd48a24084136979464fd5c69] # to [3707234163333d91629f88fd1c84576610f942f0] # ============================================================ --- src/view/TreeView.cpp 5b4f86399682825dd48a24084136979464fd5c69 +++ src/view/TreeView.cpp 3707234163333d91629f88fd1c84576610f942f0 @@ -73,7 +73,7 @@ void TreeView::contextMenuEvent(QContext ); setSelectionModel(selection); - // remove multiple cols of the same column, since we're selected + // remove multiple cols of the same row, since we're selected // complete rows we're not interested in these QModelIndexList currentSelection = selection->selectedIndexes(); for (int i=0; i < currentSelection.size(); i++) @@ -85,6 +85,21 @@ void TreeView::contextMenuEvent(QContext } } - emit contextMenuRequested(currentSelection, mapToGlobal(ev->pos())); + QPoint pos = ev->pos(); + + QHeaderView * headerView = header(); + if (headerView) + { + if (headerView->orientation() == Qt::Horizontal) + { + pos += QPoint(0, headerView->height()); + } + else + { + pos += QPoint(headerView->width(), 0); + } + } + + emit contextMenuRequested(currentSelection, mapToGlobal(pos)); }