From f8b2a04b3038eaa72cb321bbcee944395c9b528a Mon Sep 17 00:00:00 2001 From: Alejandro Martinez Date: Fri, 17 Jun 2022 11:40:29 -0300 Subject: [PATCH] One time Summary chart was deprecated when upgrading athletes With the option to cancel to give the user a chance to backup before upgrading or reinstall v3.5 Fixes #4191 --- src/Core/GcUpgrade.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Core/GcUpgrade.cpp b/src/Core/GcUpgrade.cpp index 34b617030..2dd5b66d5 100644 --- a/src/Core/GcUpgrade.cpp +++ b/src/Core/GcUpgrade.cpp @@ -381,6 +381,16 @@ GcUpgrade::upgrade(const QDir &home) //---------------------------------------------------------------------- if (last < VERSION36_BUILD) { + // Warn the user about upgrading layouts and data, giving the option to cancel when running + // a previous version, this is not necessary for new users. + if (last && QMessageBox::warning(NULL, + tr("Upgrade to v3.6"), + tr("We are about to upgrade your data and layouts to v3.6, please note Ride Summary chart was deprecated, and to use v3.5 again you will need to restore a backup"), + QMessageBox::Cancel|QMessageBox::Ok, + QMessageBox::Ok) != QMessageBox::Ok) { + return -1; + } + // reset themes on basis of plot background (first 2 themes are default dark and light themes if (GCColor::luminance(GColor(CPLOTBACKGROUND)) < 127) GCColor::applyTheme(0); else GCColor::applyTheme(1);