Revert extraneous changes.

This commit is contained in:
Aleksandr Dobkin
2026-03-11 17:20:12 -07:00
parent deb464854a
commit 59f6d75df7
7 changed files with 14 additions and 59 deletions
-1
View File
@@ -5,7 +5,6 @@
#define SLIC3R_APP_KEY "@SLIC3R_APP_KEY@" #define SLIC3R_APP_KEY "@SLIC3R_APP_KEY@"
#define SLIC3R_VERSION "@SLIC3R_VERSION@" #define SLIC3R_VERSION "@SLIC3R_VERSION@"
#define SoftFever_VERSION "@SoftFever_VERSION@" #define SoftFever_VERSION "@SoftFever_VERSION@"
#define ZAA_VERSION "@ZAA_VERSION@"
#ifndef GIT_COMMIT_HASH #ifndef GIT_COMMIT_HASH
#define GIT_COMMIT_HASH "0000000" // 0000000 means uninitialized #define GIT_COMMIT_HASH "0000000" // 0000000 means uninitialized
#endif #endif
+6 -33
View File
@@ -2572,32 +2572,13 @@ void GUI_App::init_single_instance_checker(const std::string &name, const std::s
m_single_instance_checker = std::make_unique<wxSingleInstanceChecker>(boost::nowide::widen(name), boost::nowide::widen(path)); m_single_instance_checker = std::make_unique<wxSingleInstanceChecker>(boost::nowide::widen(name), boost::nowide::widen(path));
} }
bool GUI_App::CallOnInit()
{
// Override wxApp::CallOnInit to catch exceptions from ~wxMacAutoreleasePool
try {
return wxApp::CallOnInit();
} catch (const std::exception& e) {
BOOST_LOG_TRIVIAL(fatal) << "Exception in CallOnInit: " << e.what();
return false;
} catch (...) {
// The app was initialized, just the autorelease pool cleanup threw.
// Return true to let the app continue.
return m_initialized;
}
}
bool GUI_App::OnInit() bool GUI_App::OnInit()
{ {
try { try {
return on_init_inner(); return on_init_inner();
} catch (const std::exception& e) { } catch (const std::exception& e) {
BOOST_LOG_TRIVIAL(fatal) << "OnInit Got Fatal error: " << e.what(); BOOST_LOG_TRIVIAL(fatal) << "OnInit Got Fatal error: " << e.what();
flush_logs(); generic_exception_handle();
return false;
} catch (...) {
BOOST_LOG_TRIVIAL(fatal) << "OnInit caught non-std exception";
flush_logs();
return false; return false;
} }
} }
@@ -3420,16 +3401,8 @@ bool GUI_App::on_init_network(bool try_backup)
Slic3r::NetworkAgentFactory::register_all_agents(); Slic3r::NetworkAgentFactory::register_all_agents();
// m_agent = new Slic3r::NetworkAgent(data_directory); // m_agent = new Slic3r::NetworkAgent(data_directory);
try { std::unique_ptr<Slic3r::NetworkAgent> agent_ptr = Slic3r::create_agent_from_config(data_directory, app_config);
std::unique_ptr<Slic3r::NetworkAgent> agent_ptr = Slic3r::create_agent_from_config(data_directory, app_config); m_agent = agent_ptr.release();
m_agent = agent_ptr.release();
} catch (const std::exception& e) {
BOOST_LOG_TRIVIAL(error) << "Failed to create network agent: " << e.what();
m_agent = nullptr;
} catch (...) {
BOOST_LOG_TRIVIAL(error) << "Failed to create network agent: unknown exception (code signing?)";
m_agent = nullptr;
}
if (!m_device_manager) if (!m_device_manager)
m_device_manager = new Slic3r::DeviceManager(m_agent); m_device_manager = new Slic3r::DeviceManager(m_agent);
@@ -5731,7 +5704,6 @@ std::string GUI_App::format_display_version()
if (!version_display.empty()) return version_display; if (!version_display.empty()) return version_display;
version_display = SoftFever_VERSION; version_display = SoftFever_VERSION;
version_display += " / ZAA v" + std::string(ZAA_VERSION);
return version_display; return version_display;
} }
@@ -6563,8 +6535,7 @@ void GUI_App::update_mode()
mainframe->m_param_dialog->panel()->update_mode(); mainframe->m_param_dialog->panel()->update_mode();
if (mainframe->m_printer_view) if (mainframe->m_printer_view)
mainframe->m_printer_view->update_mode(); mainframe->m_printer_view->update_mode();
if (mainframe->m_webview) mainframe->m_webview->update_mode();
mainframe->m_webview->update_mode();
#ifdef _MSW_DARK_MODE #ifdef _MSW_DARK_MODE
if (!wxGetApp().tabs_as_menu()) if (!wxGetApp().tabs_as_menu())
@@ -6576,6 +6547,8 @@ void GUI_App::update_mode()
for (auto tab : model_tabs_list) for (auto tab : model_tabs_list)
tab->update_mode(); tab->update_mode();
//BBS plater()->update_menus();
plater()->canvas3D()->update_gizmos_on_off_state(); plater()->canvas3D()->update_gizmos_on_off_state();
} }
-1
View File
@@ -324,7 +324,6 @@ public:
void on_start_subscribe_again(std::string dev_id); void on_start_subscribe_again(std::string dev_id);
std::string get_local_models_path(); std::string get_local_models_path();
bool OnInit() override; bool OnInit() override;
bool CallOnInit() override;
int OnExit() override; int OnExit() override;
bool initialized() const { return m_initialized; } bool initialized() const { return m_initialized; }
inline bool is_enable_multi_machine() { return this->app_config&& this->app_config->get("enable_multi_machine") == "true"; } inline bool is_enable_multi_machine() { return this->app_config&& this->app_config->get("enable_multi_machine") == "true"; }
-3
View File
@@ -1,7 +1,5 @@
#include "MainFrame.hpp" #include "MainFrame.hpp"
#include <boost/filesystem/directory.hpp>
#include <boost/filesystem/operations.hpp>
#include <wx/panel.h> #include <wx/panel.h>
#include <wx/notebook.h> #include <wx/notebook.h>
#include <wx/listbook.h> #include <wx/listbook.h>
@@ -25,7 +23,6 @@
#include "libslic3r/PrintConfig.hpp" #include "libslic3r/PrintConfig.hpp"
#include "libslic3r/SLAPrint.hpp" #include "libslic3r/SLAPrint.hpp"
#include "libslic3r/PresetBundle.hpp" #include "libslic3r/PresetBundle.hpp"
#include "libslic3r/Utils.hpp"
#include "Tab.hpp" #include "Tab.hpp"
#include "ProgressStatusBar.hpp" #include "ProgressStatusBar.hpp"
+1 -1
View File
@@ -622,7 +622,7 @@ void OptionsGroup::on_change_OG(const t_config_option_key& opt_id, const boost::
Option ConfigOptionsGroup::get_option(const std::string& opt_key, int opt_index /*= -1*/) Option ConfigOptionsGroup::get_option(const std::string& opt_key, int opt_index /*= -1*/)
{ {
if (!m_config->has(opt_key)) { if (!m_config->has(opt_key)) {
// Option not in config — may be newly added (e.g. ZAA options) std::cerr << "No " << opt_key << " in ConfigOptionsGroup config.\n";
} }
std::string opt_id = opt_index == -1 ? opt_key : opt_key + "#" + std::to_string(opt_index); std::string opt_id = opt_index == -1 ? opt_key : opt_key + "#" + std::to_string(opt_index);
+2 -5
View File
@@ -3846,7 +3846,7 @@ static std::vector<Search::InputInfo> get_search_inputs(ConfigOptionMode mode)
auto& tabs_list = wxGetApp().tabs_list; auto& tabs_list = wxGetApp().tabs_list;
auto print_tech = wxGetApp().preset_bundle->printers.get_selected_preset().printer_technology(); auto print_tech = wxGetApp().preset_bundle->printers.get_selected_preset().printer_technology();
for (auto tab : tabs_list) for (auto tab : tabs_list)
if (tab && tab->supports_printer_technology(print_tech) && tab->get_config()) if (tab->supports_printer_technology(print_tech))
ret.emplace_back(Search::InputInfo {tab->get_config(), tab->type(), mode}); ret.emplace_back(Search::InputInfo {tab->get_config(), tab->type(), mode});
return ret; return ret;
@@ -3870,9 +3870,7 @@ void Sidebar::update_mode()
//obj_list()->get_sizer()->Show(m_mode > comSimple); //obj_list()->get_sizer()->Show(m_mode > comSimple);
obj_list()->unselect_objects(); obj_list()->unselect_objects();
// Guard: during startup the 3D canvas selection may not be fully initialized obj_list()->update_selections();
if (wxGetApp().initialized())
obj_list()->update_selections();
// obj_list()->update_object_menu(); // obj_list()->update_object_menu();
Layout(); Layout();
@@ -10417,7 +10415,6 @@ void Plater::priv::set_project_name(const wxString& project_name)
{ {
BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " project is:" << project_name; BOOST_LOG_TRIVIAL(trace) << __FUNCTION__ << __LINE__ << " project is:" << project_name;
m_project_name = project_name; m_project_name = project_name;
wxString name = project_name + " - OrcaSlicer-ZAA";
//update topbar title //update topbar title
#ifdef __APPLE__ #ifdef __APPLE__
wxGetApp().mainframe->SetTitle(m_project_name); wxGetApp().mainframe->SetTitle(m_project_name);
+4 -14
View File
@@ -70,7 +70,6 @@ static std::string get_key(const std::string &opt_key, Preset::Type type) { retu
void OptionsSearcher::append_options(DynamicPrintConfig *config, Preset::Type type, ConfigOptionMode mode) void OptionsSearcher::append_options(DynamicPrintConfig *config, Preset::Type type, ConfigOptionMode mode)
{ {
if (!config) return;
auto emplace = [this, type](const std::string key, const wxString &label) { auto emplace = [this, type](const std::string key, const wxString &label) {
const GroupAndCategory &gc = groups_and_categories[key]; const GroupAndCategory &gc = groups_and_categories[key];
if (gc.group.IsEmpty() || gc.category.IsEmpty()) return; if (gc.group.IsEmpty() || gc.category.IsEmpty()) return;
@@ -90,19 +89,13 @@ void OptionsSearcher::append_options(DynamicPrintConfig *config, Preset::Type ty
}; };
for (std::string opt_key : config->keys()) { for (std::string opt_key : config->keys()) {
auto def_it = config->def()->options.find(opt_key); const ConfigOptionDef &opt = config->def()->options.at(opt_key);
if (def_it == config->def()->options.end()) {
continue;
}
const ConfigOptionDef &opt = def_it->second;
if (opt.mode > mode) continue; if (opt.mode > mode) continue;
int cnt = 0; int cnt = 0;
if ((type == Preset::TYPE_SLA_MATERIAL || type == Preset::TYPE_PRINTER || type == Preset::TYPE_PRINT) && opt_key != "printable_area") { if ((type == Preset::TYPE_SLA_MATERIAL || type == Preset::TYPE_PRINTER) && opt_key != "printable_area")
const ConfigOption *opt_ptr = config->option(opt_key); switch (config->option(opt_key)->type()) {
if (!opt_ptr) continue;
switch (opt_ptr->type()) {
case coInts: change_opt_key<ConfigOptionInts>(opt_key, config, cnt); break; case coInts: change_opt_key<ConfigOptionInts>(opt_key, config, cnt); break;
case coBools: change_opt_key<ConfigOptionBools>(opt_key, config, cnt); break; case coBools: change_opt_key<ConfigOptionBools>(opt_key, config, cnt); break;
case coFloats: change_opt_key<ConfigOptionFloats>(opt_key, config, cnt); break; case coFloats: change_opt_key<ConfigOptionFloats>(opt_key, config, cnt); break;
@@ -113,7 +106,6 @@ void OptionsSearcher::append_options(DynamicPrintConfig *config, Preset::Type ty
case coEnums: change_opt_key<ConfigOptionInts>(opt_key, config, cnt); break; case coEnums: change_opt_key<ConfigOptionInts>(opt_key, config, cnt); break;
default: break; default: break;
} }
}
wxString label = opt.full_label.empty() ? opt.label : opt.full_label; wxString label = opt.full_label.empty() ? opt.label : opt.full_label;
@@ -297,9 +289,7 @@ OptionsSearcher::~OptionsSearcher() {}
void OptionsSearcher::init(std::vector<InputInfo> input_values) void OptionsSearcher::init(std::vector<InputInfo> input_values)
{ {
options.clear(); options.clear();
for (size_t idx = 0; idx < input_values.size(); ++idx) { for (auto i : input_values) append_options(i.config, i.type, i.mode);
append_options(input_values[idx].config, input_values[idx].type, input_values[idx].mode);
}
sort_options(); sort_options();
search(search_line, true, search_type); search(search_line, true, search_type);