From 2478158c0ffef182dadedcfb405fb40ded150eaa Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Sat, 30 Dec 2017 08:33:30 +0100 Subject: Reenable pressure interpolation in context menu This fixes a bug reported by Willem that removing waypoints using the right click context menu makes the cylinder pressure lines partly disappear. The reason was that clicking a dive handler disables the pressure interpolation (and other things, controlled by shouldCalculateMaxdepth). This is turned on again upon the mouse release event. This event is not triggered when selecting in item from the context menu (like remove waypoint or gas selection) so we need to send it manually. Signed-off-by: Robert C. Helling --- desktop-widgets/diveplanner.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'desktop-widgets/diveplanner.cpp') diff --git a/desktop-widgets/diveplanner.cpp b/desktop-widgets/diveplanner.cpp index 24b428059..bac0f9495 100644 --- a/desktop-widgets/diveplanner.cpp +++ b/desktop-widgets/diveplanner.cpp @@ -44,6 +44,7 @@ void DiveHandler::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { QMenu m; // Don't have a gas selection for the last point + emit released(); QModelIndex index = plannerModel->index(parentIndex(), DivePlannerPointsModel::GAS); if (index.sibling(index.row() + 1, index.column()).isValid()) { GasSelectionModel *model = GasSelectionModel::instance(); -- cgit v1.2.3-70-g09d2