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:
SoftFever
2026-07-14 02:54:20 +08:00
27 changed files with 1149 additions and 732 deletions

View File

@@ -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