mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 18:27:00 +00:00
Show a warning dialog about profile sync changes. (#14377)
This commit is contained in:
@@ -940,6 +940,33 @@ void GUI_App::post_init()
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Orca: notify users upgrading from a pre-2.4.0 version that profile syncing
|
||||||
|
// moved from Bambu Cloud to Orca Cloud.
|
||||||
|
if (is_editor() && m_last_config_version && m_last_config_version->valid()
|
||||||
|
&& *m_last_config_version < Semver(2, 4, 0)) {
|
||||||
|
CallAfter([] {
|
||||||
|
const wxString wiki_url = "https://www.orcaslicer.com/wiki/user_profiles/user_profiles.html#profiles-missing-after-updating-from-bambu-cloud";
|
||||||
|
MessageDialog dlg(nullptr,
|
||||||
|
_L("Since version 2.4.0, OrcaSlicer syncs user profiles through Orca Cloud instead of Bambu Cloud.\n\n"
|
||||||
|
"To migrate your existing profiles, log in to Orca Cloud and they will be transferred automatically. "
|
||||||
|
"If any profiles are still missing afterwards, follow the guide in our wiki to restore them.\n\n"
|
||||||
|
"If you did not use Bambu Cloud to sync profiles, this change does not affect you and you can safely ignore this message."),
|
||||||
|
_L("Profile syncing change"),
|
||||||
|
wxOK,
|
||||||
|
"",
|
||||||
|
_L("Learn more"),
|
||||||
|
[wiki_url](const wxString &) { wxLaunchDefaultBrowser(wiki_url); });
|
||||||
|
// Hack: the "Learn more" link renders the message in a wxHtmlWindow whose
|
||||||
|
// height is underestimated for multi-paragraph text, leaving a scrollbar.
|
||||||
|
// The html sits in a proportion-1 sizer chain, so grow the dialog (never
|
||||||
|
// shrink it below its content width) to give the text enough room.
|
||||||
|
const wxSize sz = dlg.GetSize();
|
||||||
|
dlg.SetSize(std::max(sz.x, dlg.FromDIP(280)), std::max(sz.y, dlg.FromDIP(200)));
|
||||||
|
dlg.CenterOnParent();
|
||||||
|
dlg.ShowModal();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if(!m_networking_need_update && m_agent) {
|
if(!m_networking_need_update && m_agent) {
|
||||||
m_agent->set_on_ssdp_msg_fn(
|
m_agent->set_on_ssdp_msg_fn(
|
||||||
[this](std::string json_str) {
|
[this](std::string json_str) {
|
||||||
@@ -2772,8 +2799,9 @@ bool GUI_App::on_init_inner()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(app_config->get("version") != SLIC3R_VERSION) {
|
//Orca: write OrcaSlicer version
|
||||||
app_config->set("version", SLIC3R_VERSION);
|
if(app_config->get("version") != SoftFever_VERSION) {
|
||||||
|
app_config->set("version", SoftFever_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Orca: use wxWeakRef to provent wild pointer.
|
// Orca: use wxWeakRef to provent wild pointer.
|
||||||
|
|||||||
Reference in New Issue
Block a user