From fc066ad3e5c74d6903475ccda8599c211fc6dea7 2017-08-28 07:57:47 From: Alexandre Leroux Date: 2017-08-28 07:57:47 Subject: [PATCH] Fixed menus position --- diff --git a/gui/src/DataSource/DataSourceWidget.cpp b/gui/src/DataSource/DataSourceWidget.cpp index e1de06d..454f76b 100644 --- a/gui/src/DataSource/DataSourceWidget.cpp +++ b/gui/src/DataSource/DataSourceWidget.cpp @@ -94,7 +94,7 @@ void DataSourceWidget::onTreeMenuRequested(const QPoint &pos) noexcept treeMenu.addActions(selectedItem->actions()); if (!treeMenu.isEmpty()) { - treeMenu.exec(mapToGlobal(pos)); + treeMenu.exec(QCursor::pos()); } } } diff --git a/gui/src/Variable/VariableInspectorWidget.cpp b/gui/src/Variable/VariableInspectorWidget.cpp index 94d06f9..3b9066c 100644 --- a/gui/src/Variable/VariableInspectorWidget.cpp +++ b/gui/src/Variable/VariableInspectorWidget.cpp @@ -189,7 +189,7 @@ void VariableInspectorWidget::onTableMenuRequested(const QPoint &pos) noexcept tableMenu.insertAction(firstAction, headerAction); // Displays menu - tableMenu.exec(mapToGlobal(pos)); + tableMenu.exec(QCursor::pos()); } } diff --git a/gui/src/Visualization/VisualizationGraphWidget.cpp b/gui/src/Visualization/VisualizationGraphWidget.cpp index 2245196..a8d4d3a 100644 --- a/gui/src/Visualization/VisualizationGraphWidget.cpp +++ b/gui/src/Visualization/VisualizationGraphWidget.cpp @@ -218,7 +218,7 @@ void VisualizationGraphWidget::onGraphMenuRequested(const QPoint &pos) noexcept } if (!graphMenu.isEmpty()) { - graphMenu.exec(mapToGlobal(pos)); + graphMenu.exec(QCursor::pos()); } }