mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-01-30 23:48:44 +03:00
Optimized configuration update notification
This commit is contained in:
@@ -901,7 +901,8 @@ private:
|
|||||||
// non-static so its not loaded too early. If static, the translations wont load correctly.
|
// non-static so its not loaded too early. If static, the translations wont load correctly.
|
||||||
const std::vector<NotificationData> basic_notifications = {
|
const std::vector<NotificationData> basic_notifications = {
|
||||||
{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotificationLevel, 10, _u8L("3D Mouse disconnected.") },
|
{NotificationType::Mouse3dDisconnected, NotificationLevel::RegularNotificationLevel, 10, _u8L("3D Mouse disconnected.") },
|
||||||
{NotificationType::PresetUpdateAvailable, NotificationLevel::ImportantNotificationLevel, 20, _u8L("Configuration update is available."), _u8L("See more."),
|
//Y24
|
||||||
|
{NotificationType::PresetUpdateAvailable, NotificationLevel::ImportantNotificationLevel, 0, _u8L("Configuration update is available."), _u8L("See more."),
|
||||||
[](wxEvtHandler* evnthndlr) {
|
[](wxEvtHandler* evnthndlr) {
|
||||||
if (evnthndlr != nullptr)
|
if (evnthndlr != nullptr)
|
||||||
wxPostEvent(evnthndlr, PresetUpdateAvailableClickedEvent(EVT_PRESET_UPDATE_AVAILABLE_CLICKED));
|
wxPostEvent(evnthndlr, PresetUpdateAvailableClickedEvent(EVT_PRESET_UPDATE_AVAILABLE_CLICKED));
|
||||||
|
|||||||
@@ -942,6 +942,11 @@ Updates PresetUpdater::priv::get_config_updates(const Semver &old_slic3r_version
|
|||||||
new_update = Update(std::move(path_in_rsrc), std::move(bundle_path), *recommended, vp.name, vp.changelog_url, current_not_supported);
|
new_update = Update(std::move(path_in_rsrc), std::move(bundle_path), *recommended, vp.name, vp.changelog_url, current_not_supported);
|
||||||
bundle_path_idx_to_install = path_idx_in_rsrc;
|
bundle_path_idx_to_install = path_idx_in_rsrc;
|
||||||
found = true;
|
found = true;
|
||||||
|
//Y24
|
||||||
|
} else if (rsrc_vp.config_version > vp.config_version) {
|
||||||
|
new_update = Update(std::move(path_in_rsrc), std::move(bundle_path), *recommended, vp.name, vp.changelog_url, current_not_supported);
|
||||||
|
bundle_path_idx_to_install = path_idx_in_rsrc;
|
||||||
|
found = true;
|
||||||
} else {
|
} else {
|
||||||
BOOST_LOG_TRIVIAL(warning) << format("The recommended config version for vendor `%1%` in resources does not match the recommended\n"
|
BOOST_LOG_TRIVIAL(warning) << format("The recommended config version for vendor `%1%` in resources does not match the recommended\n"
|
||||||
" config version for this version of QIDISlicer. Corrupted installation?", idx.vendor());
|
" config version for this version of QIDISlicer. Corrupted installation?", idx.vendor());
|
||||||
|
|||||||
Reference in New Issue
Block a user