Fixed a bug where moving a handler would mess the planner

Fixed a bug where moving a handler would mess the planner
by calculating invalid values to the planner on the model
side.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-08-26 16:36:30 -03:00
parent 367fc6e1c3
commit 5ad4cfe8e2

View file

@ -637,8 +637,8 @@ void DivePlannerGraphics::mouseReleaseEvent(QMouseEvent* event)
int pos = handles.indexOf(activeDraggedHandler);
divedatapoint data = plannerModel->at(pos);
data.depth = rint(depthLine->valueAt(mappedPos));
data.time = rint(timeLine->valueAt(mappedPos));
data.depth = rint(depthLine->valueAt(mappedPos)) * 1000;
data.time = rint(timeLine->valueAt(mappedPos)) * 60;
plannerModel->editStop(pos, data);