SendSystemInfo: Open the dialog based on appconfig, even in alphas

This commit is contained in:
Lukas Matena 2021-10-06 15:49:17 +02:00
parent f72a5cf1e7
commit 3f9cefc168

View File

@ -131,16 +131,14 @@ public:
// current version is newer. Only major and minor versions are compared. // current version is newer. Only major and minor versions are compared.
static bool should_dialog_be_shown() static bool should_dialog_be_shown()
{ {
return false;
std::string last_sent_version = wxGetApp().app_config->get("version_system_info_sent"); std::string last_sent_version = wxGetApp().app_config->get("version_system_info_sent");
Semver semver_current(SLIC3R_VERSION); Semver semver_current(SLIC3R_VERSION);
Semver semver_last_sent; Semver semver_last_sent;
if (! last_sent_version.empty()) if (! last_sent_version.empty())
semver_last_sent = Semver(last_sent_version); semver_last_sent = Semver(last_sent_version);
if (semver_current.prerelease() && std::string(semver_current.prerelease()) == "alpha") // if (semver_current.prerelease() && std::string(semver_current.prerelease()) == "alpha")
return false; // Don't show in alphas. // return false; // Don't show in alphas.
// Show the dialog if current > last, but they differ in more than just patch. // Show the dialog if current > last, but they differ in more than just patch.
return ((semver_current.maj() > semver_last_sent.maj()) return ((semver_current.maj() > semver_last_sent.maj())