FIX: unload default user presets

Change-Id: I55e289708603f06263a64d4cfbfd1db596fdc864
This commit is contained in:
chunmao.guo 2023-04-12 11:15:58 +08:00 committed by Lane.Wei
parent 87abd65ea4
commit fd787adf6b
2 changed files with 6 additions and 6 deletions

View file

@ -866,7 +866,7 @@ void PresetBundle::remove_users_preset(AppConfig &config, std::map<std::string,
std::string printer_selected_preset_name = printers.get_selected_preset().name;
bool need_reset_printer_preset = false;
for (auto it = printers.begin(); it != printers.end();) {
if (it->is_user() && !it->user_id.empty() && it->user_id.compare(preset_folder_user_id) == 0 && check_removed(*it)) {
if (it->is_user() && it->user_id.compare(preset_folder_user_id) == 0 && check_removed(*it)) {
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(":printers erase %1%, type %2% user_id %3%") % it->name % Preset::get_type_string(it->type) % it->user_id;
if (it->name == printer_selected_preset_name)
need_reset_printer_preset = true;

View file

@ -3962,15 +3962,15 @@ void GUI_App::on_user_login_handle(wxCommandEvent &evt)
wxQueueEvent(this, evt);
});
if (app_config->get("sync_user_preset") == "true") {
if (online_login)
GUI::wxGetApp().mainframe->show_sync_dialog();
else if (app_config->get("sync_user_preset") == "true") {
enable_user_preset_folder(true);
} else {
enable_user_preset_folder(false);
}
if (online_login)
GUI::wxGetApp().mainframe->show_sync_dialog();
//show publish button
if (m_agent->is_user_login() && mainframe) {
int identifier;