[PATCH 3/6] Only check for update after successfull download

Anton Lundin glance at acc.umu.se
Mon Dec 29 15:25:56 PST 2014


We check that the logbook download didn't error out before checking if
we should remind the user to upgrade the firmware. Otherwise we will
check if whatever the current firmware version is, is greater than zero
and always remind the user to upgrade the fw.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 qt-ui/downloadfromdivecomputer.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index a356a76..7f5fd4a 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -403,7 +403,7 @@ void DownloadFromDCWidget::onDownloadThreadFinished()
 			MainWindow::instance()->dive_list()->unselectDives();
 			MainWindow::instance()->dive_list()->selectDive(idx, true);
 			QString dcName = data.devname;
-			if (ostcFirmwareCheck)
+			if (ostcFirmwareCheck && currentState == DONE)
 				ostcFirmwareCheck->checkLatest(this, &data);
 		}
 	} else if (currentState == CANCELLING || currentState == CANCELLED) {
-- 
2.1.0



More information about the subsurface mailing list