fix code format.

This commit is contained in:
alves
2025-12-29 14:34:15 +08:00
parent a66399730b
commit 378f76bd4d
3 changed files with 7 additions and 42 deletions

View File

@@ -909,44 +909,6 @@ void GUI_App::post_init()
}
//#endif
//BBS: remove GCodeViewer as seperate APP logic
/*if (this->init_params->start_as_gcodeviewer) {
if (! this->init_params->input_files.empty())
this->plater()->load_gcode(wxString::FromUTF8(this->init_params->input_files[0].c_str()));
}
else
{
if (! this->init_params->preset_substitutions.empty())
show_substitutions_info(this->init_params->preset_substitutions);
#if 0
// Load the cummulative config over the currently active profiles.
//FIXME if multiple configs are loaded, only the last one will have an effect.
// We need to decide what to do about loading of separate presets (just print preset, just filament preset etc).
// As of now only the full configs are supported here.
if (!m_print_config.empty())
this->gui->mainframe->load_config(m_print_config);
#endif
if (! this->init_params->load_configs.empty())
// Load the last config to give it a name at the UI. The name of the preset may be later
// changed by loading an AMF or 3MF.
//FIXME this is not strictly correct, as one may pass a print/filament/printer profile here instead of a full config.
this->mainframe->load_config_file(this->init_params->load_configs.back());
// If loading a 3MF file, the config is loaded from the last one.
if (!this->init_params->input_files.empty()) {
const std::vector<size_t> res = this->plater()->load_files(this->init_params->input_files);
if (!res.empty() && this->init_params->input_files.size() == 1) {
// Update application titlebar when opening a project file
const std::string& filename = this->init_params->input_files.front();
//BBS: remove amf logic as project
if (boost::algorithm::iends_with(filename, ".3mf"))
this->plater()->set_project_filename(filename);
}
}
if (! this->init_params->extra_config.empty())
this->mainframe->load_config(this->init_params->extra_config);
}*/
// BBS: to be checked
#if 1
// show "Did you know" notification
@@ -5024,7 +4986,7 @@ void maybe_attach_updater_signature(Http& http, const std::string& canonical_que
} // namespace
void GUI_App::check_new_version_sf(bool show_tips, int by_user)
void GUI_App::check_new_version_sf(bool show_tips, bool by_user)
{
AppConfig* app_config = wxGetApp().app_config;
bool check_stable_only = app_config->get_bool("check_stable_update_only");
@@ -5112,7 +5074,7 @@ void GUI_App::check_new_version_sf(bool show_tips, int by_user)
}
// if we're the most recent, don't do anything
if ((check_stable_only ? best_release : best_pre) <= current_version) {
if (by_user != 0)
if (by_user)
this->no_new_version();
return;
}

View File

@@ -587,7 +587,7 @@ private:
void check_update(bool show_tips, int by_user);
void check_new_version(bool show_tips = false, int by_user = 0);
void check_new_version_sf(bool show_tips = false, int by_user = 0);
void check_new_version_sf(bool show_tips = false, bool by_user = false);
void process_network_msg(std::string dev_id, std::string msg);
void request_new_version(int by_user);
void enter_force_upgrade();

View File

@@ -77,6 +77,9 @@
#include "sentry_wrapper/SentryWrapper.hpp"
#define UPDATE_BUSER true
#define UPDATE_BUAUTO false
namespace Slic3r {
namespace GUI {
@@ -2294,7 +2297,7 @@ static wxMenu* generate_help_menu()
// Check New Version
append_menu_item(helpMenu, wxID_ANY, _L("Check for Update"), _L("Check for Update"),
[](wxCommandEvent&) {
wxGetApp().check_new_version_sf(true, 1);
wxGetApp().check_new_version_sf(true, UPDATE_BUSER);
}, "", nullptr, []() {
return true;
});