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 <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-12-30 08:33:30 +01:00 committed by Jan Mulder
parent 8a9accba54
commit 2478158c0f
2 changed files with 2 additions and 0 deletions

View file

@ -1 +1,2 @@
- Fix bug in cylider pressure lines
- Add changes after 4.7.6 above this line

View file

@ -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();