Hi,

after some search, I found I was responsible for #803: When I turned off 
repotting while the cylinder type combo box is active, I explicitly called 
replot when it became inactive not realising that replot is quite aggressive 
(it overwrites displayed dive with current dive) and thus undoes the change of 
cylinder type.

This patch deletes this explicit replot and thus

fixes #803.

What this does not address is that we need a proper replot, one that just does 
that: update the plot to the current values in displayed_dive. Or even better: 
finer granularity of what to replot (deco information, gas information). 
Currently when the user changes the mix of one of the cylinders, the plot is 
not updated to reflect that until „Apply“ is pressed. This should be changed. 
But not now, before the release.

Which brings me to: I recently sent a patch that does such repotting of the 
computed ceiling, when the devised is changed. That is not pushed, yet.

Best
Robert

From 27d9f9e8cda977caf575386f95c0598559305da7 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <[email protected]>
Date: Sat, 31 Jan 2015 22:25:28 +0100
Subject: [PATCH] Don't call replot when exiting cylinder combo box

Commit b72c32da7 turned off replotting while the cylinder
combo box was active to speed up editing. After leaving
the combo box, replotting was enabled again and a replot
was called.

This replot is too agressive, as it overwrites the displayed
dive with the current dive and thereby resets the cyinder
change. This eliminates the replot call.

Signed-off-by: Robert C. Helling <[email protected]>
---
 qt-ui/modeldelegates.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index 1765659..e36d0dd 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -244,7 +244,9 @@ TankInfoDelegate::TankInfoDelegate(QObject *parent) : 
ComboBoxDelegate(TankInfoM
 void TankInfoDelegate::reenableReplot(QWidget *widget, 
QAbstractItemDelegate::EndEditHint hint)
 {
        MainWindow::instance()->graphics()->setReplot(true);
-       MainWindow::instance()->graphics()->replot();
+       // FIXME: We need to replot after a cylidner is selected but the replot 
below overwrites
+       //        the newly selected cylinder.
+       //      MainWindow::instance()->graphics()->replot();
 }
 
 void TankInfoDelegate::revertModelData(QWidget *widget, 
QAbstractItemDelegate::EndEditHint hint)
-- 
1.9.3 (Apple Git-50)



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to