Remove print tracking

This commit is contained in:
Noisyfox
2025-10-30 14:46:01 +08:00
parent 96ad19c53f
commit 1aad85aee4

View File

@@ -4377,9 +4377,6 @@ private:
// vector of all warnings generated by last slicing
std::vector<std::pair<Slic3r::PrintStateBase::Warning, size_t>> current_warnings;
bool show_warning_dialog { false };
//record print preset
void record_start_print_preset(std::string action);
};
const std::regex Plater::priv::pattern_bundle(".*[.](amf|amf[.]xml|zip[.]amf|3mf)", std::regex::icase);
@@ -9324,7 +9321,6 @@ void Plater::priv::on_action_print_plate(SimpleEvent&)
m_select_machine_dlg->set_print_type(PrintFromType::FROM_NORMAL);
m_select_machine_dlg->prepare(partplate_list.get_curr_plate_index());
m_select_machine_dlg->ShowModal();
record_start_print_preset("print_plate");
} else {
q->send_gcode_legacy(PLATE_CURRENT_IDX, nullptr, true);
}
@@ -9426,7 +9422,6 @@ void Plater::priv::on_action_print_all(SimpleEvent&)
m_select_machine_dlg->set_print_type(PrintFromType::FROM_NORMAL);
m_select_machine_dlg->prepare(PLATE_ALL_IDX);
m_select_machine_dlg->ShowModal();
record_start_print_preset("print_all");
} else {
q->send_gcode_legacy(PLATE_ALL_IDX, nullptr, true);
}
@@ -11039,51 +11034,6 @@ bool Plater::priv::PopupObjectTable(int object_id, int volume_id, const wxPoint&
return true;
}
void Plater::priv::record_start_print_preset(std::string action) {
// record start print preset
try {
json j;
j["user_mode"] = wxGetApp().get_mode_str();
int plate_count = partplate_list.get_plate_count();
j["plate_count"] = plate_count;
unsigned int obj_count = model.objects.size();
j["obj_count"] = obj_count;
auto printer_preset = wxGetApp().preset_bundle->printers.get_edited_preset_with_vendor_profile().preset;
if (printer_preset.is_system) {
j["printer_preset_name"] = printer_preset.name;
}
else {
j["printer_preset_name"] = printer_preset.config.opt_string("inherits");
}
auto filament_presets = wxGetApp().preset_bundle->filament_presets;
for (int i = 0; i < filament_presets.size(); ++i) {
auto filament_preset = wxGetApp().preset_bundle->filaments.find_preset(filament_presets[i]);
if (filament_preset->is_system) {
j["filament_preset_" + std::to_string(i)] = filament_preset->name;
}
else {
j["filament_preset_" + std::to_string(i)] = filament_preset->config.opt_string("inherits");
}
}
Preset& print_preset = wxGetApp().preset_bundle->prints.get_edited_preset();
if (print_preset.is_system) {
j["process_preset"] = print_preset.name;
}
else {
j["process_preset"] = print_preset.config.opt_string("inherits");
}
j["record_event"] = action;
NetworkAgent* agent = wxGetApp().getAgent();
}
catch (...) {
return;
}
}
void Sidebar::set_btn_label(const ActionButtonType btn_type, const wxString& label) const
{
switch (btn_type)