mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
Merge remote-tracking branch 'origin/main' into feature/h2c_support_clean
# Conflicts: # localization/i18n/fr/OrcaSlicer_fr.po # localization/i18n/list.txt
This commit is contained in:
@@ -301,7 +301,7 @@ void AMSMaterialsSetting::create_panel_kn(wxWindow* parent)
|
||||
if (language.find("zh") == 0)
|
||||
region = "zh";
|
||||
wxString link_url = wxString::Format("https://wiki.bambulab.com/%s/software/bambu-studio/calibration_pa", region);
|
||||
m_wiki_ctrl = new HyperLink(parent, "Wiki Guide", link_url);
|
||||
m_wiki_ctrl = new HyperLink(parent, _L("Wiki Guide"), link_url);
|
||||
cali_title_sizer->Add(m_ratio_text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
cali_title_sizer->Add(m_wiki_ctrl, 0, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
|
||||
@@ -590,7 +590,7 @@ PingCodeBindDialog::~PingCodeBindDialog() {
|
||||
sizer_error_code->Add(m_st_txt_error_code, 0, wxALL, 0);
|
||||
|
||||
|
||||
auto st_title_error_desc = new wxStaticText(m_sw_bind_failed_info, wxID_ANY, wxT("Error desc"));
|
||||
auto st_title_error_desc = new wxStaticText(m_sw_bind_failed_info, wxID_ANY, _L("Error desc"));
|
||||
auto st_title_error_desc_doc = new wxStaticText(m_sw_bind_failed_info, wxID_ANY, ": ");
|
||||
m_st_txt_error_desc = new Label(m_sw_bind_failed_info, wxEmptyString);
|
||||
st_title_error_desc->SetForegroundColour(0x909090);
|
||||
@@ -607,7 +607,7 @@ PingCodeBindDialog::~PingCodeBindDialog() {
|
||||
sizer_error_desc->Add(st_title_error_desc_doc, 0, wxALL, 0);
|
||||
sizer_error_desc->Add(m_st_txt_error_desc, 0, wxALL, 0);
|
||||
|
||||
auto st_title_extra_info = new wxStaticText(m_sw_bind_failed_info, wxID_ANY, wxT("Extra info"));
|
||||
auto st_title_extra_info = new wxStaticText(m_sw_bind_failed_info, wxID_ANY, _L("Extra info"));
|
||||
auto st_title_extra_info_doc = new wxStaticText(m_sw_bind_failed_info, wxID_ANY, ": ");
|
||||
m_st_txt_extra_info = new Label(m_sw_bind_failed_info, wxEmptyString);
|
||||
st_title_extra_info->SetForegroundColour(0x909090);
|
||||
|
||||
@@ -10294,6 +10294,9 @@ void GLCanvas3D::_set_warning_notification_if_needed(EWarning warning)
|
||||
|
||||
void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||
{
|
||||
// Skip on shutdown: Plater's pImpl is already freed, so get_notification_manager() would use-after-free.
|
||||
if (wxGetApp().is_closing())
|
||||
return;
|
||||
using NotificationLevel = NotificationManager::NotificationLevel;
|
||||
enum ErrorType{
|
||||
PLATER_WARNING,
|
||||
|
||||
@@ -3633,8 +3633,24 @@ void GUI_App::switch_printer_agent()
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ": printer agent switched to " << effective_agent_id;
|
||||
|
||||
// Auto-switch MachineObject
|
||||
// Auto-switch MachineObject (new agent has empty device_info, so always re-select)
|
||||
select_machine(effective_agent_id);
|
||||
} else if (effective_agent_id != BBL_PRINTER_AGENT_ID) {
|
||||
// Orca: the agent type is unchanged (e.g. switching between two Moonraker/Klipper
|
||||
// printer presets), so the selected machine and the agent's cached device_info still
|
||||
// point at the previously active printer preset. Re-select the machine when the new
|
||||
// preset targets a different host, otherwise filament sync keeps hitting the old
|
||||
// printer. (#12506)
|
||||
if (m_device_manager && preset_bundle) {
|
||||
const DynamicPrintConfig& cfg = preset_bundle->printers.get_edited_preset().config;
|
||||
const std::string print_host = cfg.opt_string("print_host");
|
||||
if (!print_host.empty()) {
|
||||
const std::string dev_id = MachineObject::dev_id_from_address(print_host, cfg.opt_string("printhost_port"));
|
||||
MachineObject* sel = m_device_manager->get_selected_machine();
|
||||
if (!sel || sel->get_dev_id() != dev_id)
|
||||
select_machine(effective_agent_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7144,7 +7160,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
|
||||
.plater()
|
||||
->get_notification_manager()
|
||||
->push_notification(NotificationType::CustomNotification,
|
||||
NotificationManager::NotificationLevel::RegularNotificationLevel, "There is an update available. Open the preset bundle dialog to update it.");
|
||||
NotificationManager::NotificationLevel::RegularNotificationLevel, _u8L("There is an update available. Open the preset bundle dialog to update it."));
|
||||
|
||||
update_available = false;
|
||||
}
|
||||
@@ -7722,14 +7738,14 @@ bool GUI_App::load_language(wxString language, bool initial)
|
||||
|
||||
if (!wxLocale::IsAvailable(locale_language_info->Language)) {
|
||||
// Loading the language dictionary failed.
|
||||
wxString message = "Switching Orca Slicer to language " + requested_language_code + " failed.";
|
||||
wxString message = wxString::Format(_L("Switching Orca Slicer to language %s failed."), requested_language_code);
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
// likely some linux system
|
||||
message += "\nYou may need to reconfigure the missing locales, likely by running the \"locale-gen\" and \"dpkg-reconfigure locales\" commands.\n";
|
||||
message += _L("\nYou may need to reconfigure the missing locales, likely by running the \"locale-gen\" and \"dpkg-reconfigure locales\" commands.\n");
|
||||
#endif
|
||||
if (initial)
|
||||
message + "\n\nApplication will close.";
|
||||
wxMessageBox(message, "Orca Slicer - Switching language failed", wxOK | wxICON_ERROR);
|
||||
wxMessageBox(message, _L("Orca Slicer - Switching language failed"), wxOK | wxICON_ERROR);
|
||||
if (initial)
|
||||
std::exit(EXIT_FAILURE);
|
||||
else
|
||||
|
||||
@@ -1155,7 +1155,7 @@ void ObjectList::update_filament_in_config(const wxDataViewItem& item)
|
||||
|
||||
m_config = config;
|
||||
|
||||
take_snapshot("Change Filament");
|
||||
take_snapshot(_u8L("Change Filament"));
|
||||
|
||||
const int extruder = m_objects_model->GetExtruderNumber(item);
|
||||
m_config->set_key_value("extruder", new ConfigOptionInt(extruder));
|
||||
@@ -1193,7 +1193,7 @@ void ObjectList::update_name_in_model(const wxDataViewItem& item) const
|
||||
if (obj_idx < 0) return;
|
||||
const int volume_id = m_objects_model->GetVolumeIdByItem(item);
|
||||
|
||||
take_snapshot(volume_id < 0 ? "Rename Object" : "Rename Part");
|
||||
take_snapshot(volume_id < 0 ? _u8L("Rename Object") : _u8L("Rename Part"));
|
||||
|
||||
ModelObject* obj = object(obj_idx);
|
||||
if (m_objects_model->GetItemType(item) & itObject) {
|
||||
@@ -1361,7 +1361,7 @@ void ObjectList::paste_settings_into_list()
|
||||
{
|
||||
wxDataViewItemArray sels;
|
||||
GetSelections(sels);
|
||||
take_snapshot("Paste settings");
|
||||
take_snapshot(_u8L("Paste settings"));
|
||||
|
||||
std::unique_ptr<t_config_option_keys> global_keys; // need copy from global
|
||||
|
||||
@@ -1579,7 +1579,7 @@ void ObjectList::list_manipulation(const wxPoint& mouse_pos, bool evt_context_me
|
||||
int obj_idx, vol_idx;
|
||||
get_selected_item_indexes(obj_idx, vol_idx, item);
|
||||
if (obj_idx != -1) {
|
||||
Plater::TakeSnapshot(plater, "Shift objects to bed");
|
||||
Plater::TakeSnapshot(plater, _u8L("Shift objects to bed"));
|
||||
(*m_objects)[obj_idx]->ensure_on_bed();
|
||||
cnv->reload_scene(true, true);
|
||||
update_info_items(obj_idx);
|
||||
@@ -2002,7 +2002,7 @@ void ObjectList::OnDrop(wxDataViewEvent &event)
|
||||
}
|
||||
|
||||
//#if 1
|
||||
take_snapshot("Object order changed");
|
||||
take_snapshot(_u8L("Object order changed"));
|
||||
|
||||
if(m_dragged_data.type() & itObject){
|
||||
int delta = dest_obj_id < src_obj_id ? -1 : 1;
|
||||
@@ -2066,9 +2066,9 @@ void ObjectList::add_category_to_settings_from_selection(const std::vector< std:
|
||||
assert(m_config);
|
||||
auto opt_keys = m_config->keys();
|
||||
|
||||
const std::string snapshot_text = item_type & itLayer ? "Layer setting added" :
|
||||
item_type & itVolume ? "Part setting added" :
|
||||
"Object setting added";
|
||||
const std::string snapshot_text = item_type & itLayer ? _u8L("Layer setting added") :
|
||||
item_type & itVolume ? _u8L("Part setting added") :
|
||||
_u8L("Object setting added");
|
||||
take_snapshot(snapshot_text);
|
||||
|
||||
const DynamicPrintConfig& from_config = printer_technology() == ptFFF ?
|
||||
@@ -2107,9 +2107,9 @@ void ObjectList::add_category_to_settings_from_frequent(const std::vector<std::s
|
||||
assert(m_config);
|
||||
auto opt_keys = m_config->keys();
|
||||
|
||||
const std::string snapshot_text = item_type & itLayer ? "Height range settings added" :
|
||||
item_type & itVolume ? "Part settings added" :
|
||||
"Object settings added";
|
||||
const std::string snapshot_text = item_type & itLayer ? _u8L("Height range settings added") :
|
||||
item_type & itVolume ? _u8L("Part settings added") :
|
||||
_u8L("Object settings added");
|
||||
take_snapshot(snapshot_text);
|
||||
|
||||
const DynamicPrintConfig& from_config = wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
||||
@@ -2177,7 +2177,7 @@ void ObjectList::load_subobject(ModelVolumeType type, bool from_galery/* = false
|
||||
if (input_files.IsEmpty())
|
||||
return;
|
||||
|
||||
take_snapshot((type == ModelVolumeType::MODEL_PART) ? "Load Part" : "Load Modifier");
|
||||
take_snapshot((type == ModelVolumeType::MODEL_PART) ? _u8L("Load Part") : _u8L("Load Modifier"));
|
||||
|
||||
std::vector<ModelVolume*> volumes;
|
||||
// ! ysFIXME - delete commented code after testing and rename "load_modifier" to something common
|
||||
@@ -2464,7 +2464,7 @@ void ObjectList::load_generic_subobject(const std::string& type_name, const Mode
|
||||
if (instance_idx == -1)
|
||||
return;
|
||||
|
||||
take_snapshot("Add primitive");
|
||||
take_snapshot(_u8L("Add primitive"));
|
||||
|
||||
// Selected object
|
||||
ModelObject &model_object = *(*m_objects)[obj_idx];
|
||||
@@ -2556,7 +2556,7 @@ void ObjectList::load_shape_object(const std::string &type_name)
|
||||
if (obj_idx < 0)
|
||||
return;
|
||||
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Add Primitive");
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _u8L("Add Primitive"));
|
||||
|
||||
// Create mesh
|
||||
BoundingBoxf3 bb;
|
||||
@@ -2726,7 +2726,7 @@ void ObjectList::del_settings_from_config(const wxDataViewItem& parent_item)
|
||||
(is_layer_settings && opt_cnt == 2 && m_config->has("extruder") && m_config->has("layer_height")))
|
||||
return;
|
||||
|
||||
take_snapshot("Delete Settings");
|
||||
take_snapshot(_u8L("Delete Settings"));
|
||||
|
||||
int extruder = m_config->has("extruder") ? m_config->extruder() : -1;
|
||||
|
||||
@@ -2767,7 +2767,7 @@ void ObjectList::del_layer_from_object(const int obj_idx, const t_layer_height_r
|
||||
if (del_range == object(obj_idx)->layer_config_ranges.end())
|
||||
return;
|
||||
|
||||
take_snapshot("Remove height range");
|
||||
take_snapshot(_u8L("Remove height range"));
|
||||
|
||||
object(obj_idx)->layer_config_ranges.erase(del_range);
|
||||
|
||||
@@ -2840,7 +2840,7 @@ bool ObjectList::del_subobject_from_object(const int obj_idx, const int idx, con
|
||||
return false;
|
||||
}
|
||||
|
||||
take_snapshot("Delete part");
|
||||
take_snapshot(_u8L("Delete part"));
|
||||
|
||||
object->delete_volume(idx);
|
||||
|
||||
@@ -2905,7 +2905,7 @@ void ObjectList::split()
|
||||
return;
|
||||
}
|
||||
|
||||
take_snapshot("Split to parts");
|
||||
take_snapshot(_u8L("Split to parts"));
|
||||
|
||||
volume->split(filament_cnt, wxGetApp().app_config->get_bool("keep_painting"));
|
||||
|
||||
@@ -3038,7 +3038,7 @@ void ObjectList::merge(bool to_multipart_object)
|
||||
GetSelections(sels);
|
||||
assert(!sels.IsEmpty());
|
||||
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Assemble");
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _u8L("Assemble"));
|
||||
|
||||
get_object_idxs(obj_idxs, sels);
|
||||
|
||||
@@ -3186,7 +3186,7 @@ void ObjectList::merge(bool to_multipart_object)
|
||||
if (obj_idx == -1)
|
||||
return;
|
||||
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Merge parts to an object");
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _u8L("Merge parts to an object"));
|
||||
|
||||
ModelObject* model_object = (*m_objects)[obj_idx];
|
||||
model_object->merge();
|
||||
@@ -3253,7 +3253,7 @@ void ObjectList::layers_editing()
|
||||
// set some default value
|
||||
if (ranges.empty()) {
|
||||
// BBS: remove snapshot name "Add layers"
|
||||
take_snapshot("Add layers");
|
||||
take_snapshot(_u8L("Add layers"));
|
||||
ranges[{ 0.0f, 2.0f }].assign_config(get_default_layer_config(obj_idx));
|
||||
}
|
||||
|
||||
@@ -4244,7 +4244,7 @@ void ObjectList::delete_from_model_and_list(const ItemType type, const int obj_i
|
||||
if (!(type&(itObject|itVolume|itInstance)))
|
||||
return;
|
||||
|
||||
take_snapshot("Delete selected");
|
||||
take_snapshot(_u8L("Delete selected"));
|
||||
|
||||
if (type&itObject) {
|
||||
bool was_cut = object(obj_idx)->is_cut();
|
||||
@@ -4477,7 +4477,7 @@ void ObjectList::remove()
|
||||
UnselectAll();
|
||||
update_selection(sels, sels_mode, m_objects_model);
|
||||
|
||||
Plater::TakeSnapshot snapshot = Plater::TakeSnapshot(wxGetApp().plater(), "Delete selected");
|
||||
Plater::TakeSnapshot snapshot = Plater::TakeSnapshot(wxGetApp().plater(), _u8L("Delete selected"));
|
||||
|
||||
for (auto& item : sels)
|
||||
{
|
||||
@@ -5535,7 +5535,7 @@ void ObjectList::change_part_type()
|
||||
return;
|
||||
}
|
||||
|
||||
take_snapshot("Change part type");
|
||||
take_snapshot(_u8L("Change part type"));
|
||||
|
||||
volume->set_type(new_type);
|
||||
wxDataViewItemArray sel = reorder_volumes_and_get_selection(obj_idx, [volume](const ModelVolume* vol) { return vol == volume; });
|
||||
@@ -5809,7 +5809,7 @@ void ObjectList::set_volume_type(ModelVolumeType new_type)
|
||||
}
|
||||
}
|
||||
|
||||
take_snapshot("Change part type");
|
||||
take_snapshot(_u8L("Change part type"));
|
||||
|
||||
std::set<const ModelVolume*> changed_volumes;
|
||||
std::set<int> touched_objects;
|
||||
@@ -6043,7 +6043,7 @@ void ObjectList::split_instances()
|
||||
if (obj_idx == -1)
|
||||
return;
|
||||
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Instances to Separated Objects");
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _u8L("Instances to Separated Objects"));
|
||||
|
||||
if (selection.is_single_full_object())
|
||||
{
|
||||
@@ -6174,7 +6174,7 @@ void ObjectList::fix_through_cgal()
|
||||
return true;
|
||||
};
|
||||
|
||||
Plater::TakeSnapshot snapshot(plater, "Repairing model object");
|
||||
Plater::TakeSnapshot snapshot(plater, _u8L("Repairing model object"));
|
||||
|
||||
// Open a progress dialog.
|
||||
ProgressDialog progress_dlg(_L("Repairing model object"), "", 100, find_toplevel_parent(plater),
|
||||
@@ -6505,7 +6505,7 @@ void ObjectList::OnEditingStarted(wxDataViewEvent &event)
|
||||
else if (col == colSinking) {
|
||||
Plater * plater = wxGetApp().plater();
|
||||
GLCanvas3D *cnv = plater->canvas3D();
|
||||
Plater::TakeSnapshot(plater, "Shift objects to bed");
|
||||
Plater::TakeSnapshot(plater, _u8L("Shift objects to bed"));
|
||||
int obj_idx, vol_idx;
|
||||
get_selected_item_indexes(obj_idx, vol_idx, item);
|
||||
(*m_objects)[obj_idx]->ensure_on_bed();
|
||||
@@ -6592,7 +6592,7 @@ void ObjectList::set_extruder_for_selected_items(const int extruder)
|
||||
if (sels.empty())
|
||||
return;
|
||||
|
||||
take_snapshot("Change Filaments");
|
||||
take_snapshot(_u8L("Change Filaments"));
|
||||
|
||||
for (const wxDataViewItem& sel_item : sels)
|
||||
{
|
||||
|
||||
@@ -2975,7 +2975,7 @@ void GLGizmoCut3D::render_cut_plane_input_window(CutConnectors &connectors, floa
|
||||
ImGui::SameLine();
|
||||
m_imgui->disabled_begin(is_cut_plane_init && !has_connectors);
|
||||
if (m_imgui->button(_L("Reset"), _L("Reset cutting plane and remove connectors"))) {
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Reset Cut", UndoRedo::SnapshotType::GizmoAction);
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _u8L("Reset Cut"), UndoRedo::SnapshotType::GizmoAction);
|
||||
reset_cut_plane();
|
||||
reset_connectors();
|
||||
}
|
||||
@@ -3500,10 +3500,10 @@ static void check_objects_after_cut(const ModelObjectPtrs& objects)
|
||||
wxString names = from_u8(err_objects_names[0]);
|
||||
for (size_t i = 1; i < err_objects_names.size(); i++)
|
||||
names += ", " + from_u8(err_objects_names[i]);
|
||||
WarningDialog(wxGetApp().plater(), format_wxstr("Objects(%1%) have duplicated connectors. "
|
||||
WarningDialog(wxGetApp().plater(), format_wxstr(_L("Objects(%1%) have duplicated connectors. "
|
||||
"Some connectors may be missing in slicing result.\n"
|
||||
"Please report to PrusaSlicer team in which scenario this issue happened.\n"
|
||||
"Thank you.", names)).ShowModal();
|
||||
"Thank you."), names)).ShowModal();
|
||||
}
|
||||
|
||||
void synchronize_model_after_cut(Model& model, const CutObjectBase& cut_id)
|
||||
|
||||
@@ -3735,7 +3735,7 @@ void MainFrame::load_config_file()
|
||||
// return;
|
||||
wxFileDialog dlg(this, _L("Select profile to load:"),
|
||||
!m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(),
|
||||
"config.json", "Config files (*.json;*.zip;*.orca_printer;*.orca_bundle;*.orca_filament)|*.json;*.zip;*.orca_printer;*.orca_bundle;*.orca_filament", wxFD_OPEN | wxFD_MULTIPLE | wxFD_FILE_MUST_EXIST);
|
||||
"config.json", _L("Config files (*.json;*.zip;*.orca_printer;*.orca_bundle;*.orca_filament)|*.json;*.zip;*.orca_printer;*.orca_bundle;*.orca_filament"), wxFD_OPEN | wxFD_MULTIPLE | wxFD_FILE_MUST_EXIST);
|
||||
wxArrayString files;
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
return;
|
||||
|
||||
+20
-17
@@ -7624,7 +7624,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
||||
|
||||
// BBS
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ":" << __LINE__ << " " << boost::format("import 3mf IMPORT_LOAD_MODEL_OBJECTS \n");
|
||||
wxString msg = wxString::Format("Loading file: %s", from_path(real_filename));
|
||||
wxString msg = wxString::Format(_L("Loading file: %s"), from_path(real_filename));
|
||||
model_idx++;
|
||||
dlg_cont = dlg.Update(progress_percent, msg);
|
||||
if (!dlg_cont) {
|
||||
@@ -8324,7 +8324,7 @@ bool Plater::priv::delete_object_from_model(size_t obj_idx, bool refresh_immedia
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string snapshot_label = "Delete Object";
|
||||
std::string snapshot_label = _u8L("Delete Object");
|
||||
if (!obj->name.empty())
|
||||
snapshot_label += ": " + obj->name;
|
||||
Plater::TakeSnapshot snapshot(q, snapshot_label);
|
||||
@@ -8348,7 +8348,7 @@ bool Plater::priv::delete_object_from_model(size_t obj_idx, bool refresh_immedia
|
||||
|
||||
void Plater::priv::delete_all_objects_from_model()
|
||||
{
|
||||
Plater::TakeSnapshot snapshot(q, "Delete All Objects");
|
||||
Plater::TakeSnapshot snapshot(q, _u8L("Delete All Objects"));
|
||||
|
||||
if (view3D->is_layers_editing_enabled())
|
||||
view3D->enable_layers_editing(false);
|
||||
@@ -8379,7 +8379,7 @@ void Plater::priv::delete_all_objects_from_model()
|
||||
|
||||
void Plater::priv::reset(bool apply_presets_change)
|
||||
{
|
||||
Plater::TakeSnapshot snapshot(q, "Reset Project", UndoRedo::SnapshotType::ProjectSeparator);
|
||||
Plater::TakeSnapshot snapshot(q, _u8L("Reset Project"), UndoRedo::SnapshotType::ProjectSeparator);
|
||||
|
||||
clear_warnings();
|
||||
|
||||
@@ -8528,7 +8528,7 @@ void Plater::priv::split_object(int obj_idx, bool auto_drop /* = true */)
|
||||
// NotificationManager::NotificationLevel::PrintInfoNotificationLevel,
|
||||
// _u8L("All non-solid parts (modifiers) were deleted"));
|
||||
|
||||
Plater::TakeSnapshot snapshot(q, "Split to Objects");
|
||||
Plater::TakeSnapshot snapshot(q, _u8L("Split to Objects"));
|
||||
|
||||
auto is_atleast_one_floating = [new_objects]() {
|
||||
for (ModelObject* new_object : new_objects) {
|
||||
@@ -9342,7 +9342,7 @@ void Plater::priv::replace_with_stl()
|
||||
return;
|
||||
}
|
||||
|
||||
if (!replace_volume_with_stl(object_idx, volume_idx, out_path, "Replace with 3D file"))
|
||||
if (!replace_volume_with_stl(object_idx, volume_idx, out_path, _u8L("Replace with 3D file")))
|
||||
return;
|
||||
|
||||
// update 3D scene
|
||||
@@ -9459,7 +9459,7 @@ void Plater::priv::replace_all_with_stl()
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " replacing volume : " << input_path << " with " << new_path;
|
||||
|
||||
if (!replace_volume_with_stl(object_idx, volume_idx, new_path, "Replace with 3D file")) {
|
||||
if (!replace_volume_with_stl(object_idx, volume_idx, new_path, _u8L("Replace with 3D file"))) {
|
||||
status += boost::str(boost::format(_L("✖ Skipped %1%: failed to replace.\n").ToStdString()) % volume_name);
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " cannot replace volume : failed to replace with " << new_path;
|
||||
continue;
|
||||
@@ -9519,7 +9519,7 @@ void Plater::priv::reload_from_disk()
|
||||
return (v1.first == v2.first) && (v1.second == v2.second);
|
||||
}), selected_volumes.end());
|
||||
#else
|
||||
Plater::TakeSnapshot snapshot(q, "Reload from disk");
|
||||
Plater::TakeSnapshot snapshot(q, _u8L("Reload from disk"));
|
||||
|
||||
const Selection& selection = get_selection();
|
||||
|
||||
@@ -9668,7 +9668,7 @@ void Plater::priv::reload_from_disk()
|
||||
replace_paths.erase(std::unique(replace_paths.begin(), replace_paths.end()), replace_paths.end());
|
||||
|
||||
#if ENABLE_RELOAD_FROM_DISK_REWORK
|
||||
Plater::TakeSnapshot snapshot(q, "Reload from disk");
|
||||
Plater::TakeSnapshot snapshot(q, _u8L("Reload from disk"));
|
||||
#endif // ENABLE_RELOAD_FROM_DISK_REWORK
|
||||
|
||||
std::vector<wxString> fail_list;
|
||||
@@ -9961,7 +9961,7 @@ void Plater::priv::reload_all_from_disk()
|
||||
if (model.objects.empty())
|
||||
return;
|
||||
|
||||
Plater::TakeSnapshot snapshot(q, "Reload all");
|
||||
Plater::TakeSnapshot snapshot(q, _u8L("Reload all"));
|
||||
Plater::SuppressSnapshots suppress(q);
|
||||
|
||||
Selection& selection = get_selection();
|
||||
@@ -10474,11 +10474,14 @@ void Plater::priv::on_select_preset(wxCommandEvent &evt)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// BBS
|
||||
// wxWindowUpdateLocker noUpdates1(sidebar->print_panel());
|
||||
wxWindowUpdateLocker noUpdates2(sidebar->filament_panel());
|
||||
wxGetApp().get_tab(preset_type)->select_preset(preset_name);
|
||||
// update plater with new config
|
||||
q->on_config_change(wxGetApp().preset_bundle->full_config());
|
||||
}
|
||||
//BBS
|
||||
//wxWindowUpdateLocker noUpdates1(sidebar->print_panel());
|
||||
wxWindowUpdateLocker noUpdates2(sidebar->filament_panel());
|
||||
wxGetApp().get_tab(preset_type)->select_preset(preset_name);
|
||||
}
|
||||
|
||||
// ORCA: Always refresh the selected filament combo so its color swatch (clr_picker)
|
||||
@@ -13000,8 +13003,9 @@ void Plater::load_project(wxString const& filename2,
|
||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": current loading other project, return directly");
|
||||
return;
|
||||
}
|
||||
else
|
||||
m_loading_project = true;
|
||||
|
||||
m_loading_project = true;
|
||||
ScopeGuard loading_project_sc([this]() { m_loading_project = false; }); // Make sure state restored on any early return
|
||||
|
||||
m_only_gcode = false;
|
||||
m_exported_file = false;
|
||||
@@ -13095,7 +13099,6 @@ void Plater::load_project(wxString const& filename2,
|
||||
sidebar().set_flushing_volume_warning(has_modify);
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << __LINE__ << " load project done";
|
||||
m_loading_project = false;
|
||||
}
|
||||
|
||||
// BBS: save logic
|
||||
|
||||
@@ -1099,7 +1099,7 @@ void PlaterPresetComboBox::show_edit_menu()
|
||||
#ifdef __linux__
|
||||
// To edit extruder color from the sidebar
|
||||
if (m_type == Preset::TYPE_FILAMENT) {
|
||||
append_menu_item(menu, wxID_ANY, _devL("Change extruder color"), "",
|
||||
append_menu_item(menu, wxID_ANY, _L("Change extruder color"), "",
|
||||
[this](wxCommandEvent&) { this->change_extruder_color(); }, "blank_14", menu, []() { return true; }, wxGetApp().plater());
|
||||
wxGetApp().plater()->PopupMenu(menu);
|
||||
return;
|
||||
@@ -1338,7 +1338,7 @@ void PlaterPresetComboBox::update()
|
||||
selected_in_ams = add_ams_filaments(into_u8(selected_alias), true);
|
||||
}
|
||||
|
||||
std::vector<std::string> filament_orders = {"Bambu PLA Basic", "Bambu PLA Matte", "Bambu PETG HF", "Bambu ABS", "Bambu PLA Silk", "Bambu PLA-CF",
|
||||
std::vector<wxString> filament_orders = {"Bambu PLA Basic", "Bambu PLA Matte", "Bambu PETG HF", "Bambu ABS", "Bambu PLA Silk", "Bambu PLA-CF",
|
||||
"Bambu PLA Galaxy", "Bambu PLA Metal", "Bambu PLA Marble", "Bambu PETG-CF", "Bambu PETG Translucent", "Bambu ABS-GF"};
|
||||
std::vector<std::string> first_vendors = {"", "Bambu", "Generic"}; // Empty vendor for non-system presets
|
||||
std::vector<std::string> first_types = {"PLA", "PETG", "ABS", "TPU"};
|
||||
|
||||
@@ -95,7 +95,7 @@ void PrinterCloudAuthDialog::OnScriptMessage(wxWebViewEvent& evt)
|
||||
}
|
||||
Close();
|
||||
} catch (std::exception& e) {
|
||||
wxMessageBox(e.what(), "parse json failed", wxICON_WARNING);
|
||||
wxMessageBox(e.what(), _L("parse json failed"), wxICON_WARNING);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1524,7 +1524,7 @@ InputIpAddressDialog::InputIpAddressDialog(wxWindow *parent)
|
||||
m_tip4->SetMaxSize(wxSize(FromDIP(355), -1));
|
||||
|
||||
// ORCA standardized HyperLink
|
||||
m_trouble_shoot = new HyperLink(this, "How to trouble shooting");
|
||||
m_trouble_shoot = new HyperLink(this, _L("How to trouble shooting"));
|
||||
|
||||
m_img_help = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("input_access_code_x1_en", this, 198), wxDefaultPosition, wxSize(FromDIP(355), -1), 0);
|
||||
|
||||
|
||||
@@ -673,7 +673,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
sizer_error_code->Add(m_st_txt_error_code, 0, wxALL, 0);
|
||||
|
||||
|
||||
auto st_title_error_desc = new wxStaticText(m_sw_print_failed_info, wxID_ANY, wxT("Error desc"));
|
||||
auto st_title_error_desc = new wxStaticText(m_sw_print_failed_info, wxID_ANY, _L("Error desc"));
|
||||
auto st_title_error_desc_doc = new wxStaticText(m_sw_print_failed_info, wxID_ANY,": ");
|
||||
m_st_txt_error_desc = new Label(m_sw_print_failed_info, wxEmptyString);
|
||||
st_title_error_desc->SetForegroundColour(0x909090);
|
||||
@@ -690,7 +690,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
sizer_error_desc->Add(st_title_error_desc_doc, 0, wxALL, 0);
|
||||
sizer_error_desc->Add(m_st_txt_error_desc, 0, wxALL, 0);
|
||||
|
||||
auto st_title_extra_info = new wxStaticText(m_sw_print_failed_info, wxID_ANY, wxT("Extra info"));
|
||||
auto st_title_extra_info = new wxStaticText(m_sw_print_failed_info, wxID_ANY, _L("Extra info"));
|
||||
auto st_title_extra_info_doc = new wxStaticText(m_sw_print_failed_info, wxID_ANY, ": ");
|
||||
m_st_txt_extra_info = new Label(m_sw_print_failed_info, wxEmptyString);
|
||||
st_title_extra_info->SetForegroundColour(0x909090);
|
||||
|
||||
@@ -760,6 +760,9 @@ void Selection::clear()
|
||||
#endif
|
||||
|
||||
// #et_FIXME fake KillFocus from sidebar
|
||||
// Skip on shutdown: Plater's pImpl is already freed, so plater()->canvas3D() would use-after-free.
|
||||
if (wxGetApp().is_closing())
|
||||
return;
|
||||
wxGetApp().plater()->canvas3D()->handle_sidebar_focus_event("", false);
|
||||
}
|
||||
|
||||
|
||||
@@ -412,7 +412,7 @@ SendToPrinterDialog::SendToPrinterDialog(Plater *plater)
|
||||
sizer_error_code->Add(st_title_error_code_doc, 0, wxALL, 0);
|
||||
sizer_error_code->Add(m_st_txt_error_code, 0, wxALL, 0);
|
||||
|
||||
auto st_title_error_desc = new wxStaticText(m_sw_print_failed_info, wxID_ANY, wxT("Error desc"));
|
||||
auto st_title_error_desc = new wxStaticText(m_sw_print_failed_info, wxID_ANY, _L("Error desc"));
|
||||
auto st_title_error_desc_doc = new wxStaticText(m_sw_print_failed_info, wxID_ANY, ": ");
|
||||
m_st_txt_error_desc = new Label(m_sw_print_failed_info, wxEmptyString);
|
||||
st_title_error_desc->SetForegroundColour(0x909090);
|
||||
@@ -429,7 +429,7 @@ SendToPrinterDialog::SendToPrinterDialog(Plater *plater)
|
||||
sizer_error_desc->Add(st_title_error_desc_doc, 0, wxALL, 0);
|
||||
sizer_error_desc->Add(m_st_txt_error_desc, 0, wxALL, 0);
|
||||
|
||||
auto st_title_extra_info = new wxStaticText(m_sw_print_failed_info, wxID_ANY, wxT("Extra info"));
|
||||
auto st_title_extra_info = new wxStaticText(m_sw_print_failed_info, wxID_ANY, _L("Extra info"));
|
||||
auto st_title_extra_info_doc = new wxStaticText(m_sw_print_failed_info, wxID_ANY, ": ");
|
||||
m_st_txt_extra_info = new Label(m_sw_print_failed_info, wxEmptyString);
|
||||
st_title_extra_info->SetForegroundColour(0x909090);
|
||||
|
||||
@@ -5852,7 +5852,7 @@ wxBoxSizer *ScoreDialog::get_photo_btn_sizer() {
|
||||
|
||||
m_add_photo->Bind(wxEVT_LEFT_DOWN, [this](auto &e) {
|
||||
// add photo logic
|
||||
wxFileDialog openFileDialog(this, "Select Images", "", "", "Image files (*.png;*.jpg;*jpeg)|*.png;*.jpg;*.jpeg", wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE);
|
||||
wxFileDialog openFileDialog(this, _L("Select Images"), "", "", _L("Image files (*.png;*.jpg;*jpeg)|*.png;*.jpg;*.jpeg"), wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE);
|
||||
|
||||
if (openFileDialog.ShowModal() == wxID_CANCEL) return;
|
||||
|
||||
|
||||
@@ -7514,11 +7514,11 @@ wxSizer* Tab::compatible_widget_create(wxWindow* parent, PresetDependencies &dep
|
||||
}
|
||||
|
||||
if(deps.type == Preset::TYPE_PRINTER){
|
||||
deps.dialog_title = "Compatible printers";
|
||||
deps.dialog_label = "Select printers";
|
||||
deps.dialog_title = _L("Compatible printers");
|
||||
deps.dialog_label = _L("Select printers");
|
||||
}else{
|
||||
deps.dialog_title = "Compatible process profiles";
|
||||
deps.dialog_label = "Select profiles";
|
||||
deps.dialog_title = _L("Compatible process profiles");
|
||||
deps.dialog_label = _L("Select profiles");
|
||||
}
|
||||
|
||||
MultiChoiceDialog dlg(parent, deps.dialog_label, deps.dialog_title, presets);
|
||||
@@ -7805,6 +7805,11 @@ void Tab::update_extruder_variants(int extruder_id, bool reload)
|
||||
auto nozzle_volumes = m_preset_bundle->project_config.option<ConfigOptionEnumsGeneric>("nozzle_volume_type");
|
||||
int extruder_nums = m_preset_bundle->get_printer_extruder_count();
|
||||
nozzle_volumes->values.resize(extruder_nums);
|
||||
|
||||
// Orca: update `m_actual_nozzle_volumes` to current selected ones
|
||||
m_actual_nozzle_volumes.resize(extruder_nums, NozzleVolumeType::nvtStandard);
|
||||
for (int i = 0; i < extruder_nums; i++) m_actual_nozzle_volumes[i] = (NozzleVolumeType)nozzle_volumes->values[i];
|
||||
|
||||
if (extruder_nums == 2) {
|
||||
auto options = generate_extruder_options();
|
||||
m_extruder_switch->SetOptions(options);
|
||||
|
||||
@@ -2281,7 +2281,7 @@ void DiffPresetDialog::update_tree()
|
||||
const Preset* left_preset = presets->find_preset(get_selection(preset_combos.presets_left));
|
||||
const Preset* right_preset = presets->find_preset(get_selection(preset_combos.presets_right));
|
||||
if (!left_preset || !right_preset) {
|
||||
bottom_info = "One of the presets does not exist";
|
||||
bottom_info = _L("One of the presets does not exist");
|
||||
preset_combos.equal_bmp->SetBitmap_(ScalableBitmap(this, "question"));
|
||||
preset_combos.equal_bmp->SetToolTip(bottom_info);
|
||||
continue;
|
||||
@@ -2292,7 +2292,7 @@ void DiffPresetDialog::update_tree()
|
||||
const DynamicPrintConfig& right_congig = right_preset->config;
|
||||
|
||||
if (left_pt != right_preset->printer_technology()) {
|
||||
bottom_info = "Compared presets has different printer technology";
|
||||
bottom_info = _L("Compared presets has different printer technology");
|
||||
preset_combos.equal_bmp->SetBitmap_(ScalableBitmap(this, "question"));
|
||||
preset_combos.equal_bmp->SetToolTip(bottom_info);
|
||||
continue;
|
||||
@@ -2336,7 +2336,7 @@ void DiffPresetDialog::update_tree()
|
||||
wxString left_val = from_u8((boost::format("%1%") % left_config.opt<ConfigOptionStrings>("extruder_colour")->values.size()).str());
|
||||
wxString right_val = from_u8((boost::format("%1%") % right_congig.opt<ConfigOptionStrings>("extruder_colour")->values.size()).str());
|
||||
|
||||
m_tree->Append("extruders_count", type, "General", "Capabilities", local_label, left_val, right_val,
|
||||
m_tree->Append("extruders_count", type, _L("General"), _L("Capabilities"), local_label, left_val, right_val,
|
||||
get_category_icon("Basic information"));
|
||||
}
|
||||
|
||||
|
||||
@@ -506,7 +506,7 @@ void ZUserLogin::OnScriptMessage(wxWebViewEvent &evt)
|
||||
return;
|
||||
}
|
||||
} catch (std::exception &e) {
|
||||
wxMessageBox(e.what(), "parse json failed", wxICON_WARNING);
|
||||
wxMessageBox(e.what(), _L("parse json failed"), wxICON_WARNING);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -556,7 +556,7 @@ bool ProgressDialog::Update(int value, const wxString &newmsg, bool *skip)
|
||||
|
||||
if (newmsg.empty()) {
|
||||
// also provide the finishing message if the application didn't
|
||||
m_msg->SetLabel(wxGetTranslation("Done."));
|
||||
m_msg->SetLabel(_L("Done."));
|
||||
}
|
||||
|
||||
// allow the window to repaint:
|
||||
|
||||
Reference in New Issue
Block a user