fix: treat renamed printer presets as compatible aliases (#14504)

# Description

Fixes user filament presets that reference an old printer preset name in
`compatible_printers`, even when the current system printer preset
correctly declares that old name in `renamed_from`.

## Core Issue

`PresetCollection::find_preset()` was updated to resolve `renamed_from`,
but this specific failure does not go through `find_preset()`.

For root user filament presets with empty `inherits`, Orca infers
`compatible_printers` from the filament name suffix after `@`. For
example:

```json
"ELEGOO PLA Base @Elegoo Neptune 4 Pro (0.4 nozzle)"
```

loads with:

```json
"compatible_printers": ["Elegoo Neptune 4 Pro (0.4 nozzle)"]
```

The current system printer preset is named:

```text
Elegoo Neptune 4 Pro 0.4 nozzle
```

and has:

```json
"renamed_from": "Elegoo Neptune 4 Pro (0.4 nozzle)"
```

However, filament compatibility was doing a direct string comparison
against the active printer name. Since that compatibility path does not
call `find_preset()`, the `renamed_from` mapping was never considered.

## Fix

Teach printer compatibility checks to treat
`active_printer.preset.renamed_from` entries as aliases of the active
printer name.

This preserves existing user preset JSON and avoids rewriting
`compatible_printers`, while allowing old printer suffixes to remain
compatible with renamed system printer presets.

## Tests

<!--
> A guide for users on how to download the artifacts from this PR.
-->

[How to Download Pull Requests Artifacts for
Testing](https://www.orcaslicer.com/wiki/how_to_download_pr_artifacts)
This commit is contained in:
SoftFever
2026-07-01 21:56:31 +08:00
parent 128068cb65
commit feeea3e651
703 changed files with 2121 additions and 2193 deletions

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "9aEE4QRwpA84OcRn",
"name": "0.08mm Extra Fine @X-Max 4 0.2 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "9aEE4QRwpA84OcRn",
"instantiation": "true",
"bottom_color_penetration_layers": "5",
"bottom_shell_layers": "5",
"bridge_flow": "1",

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "669lYZL76CKm2XKo",
"name": "0.08mm Extra Fine @X-Max 4",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "669lYZL76CKm2XKo",
"instantiation": "true",
"bottom_color_penetration_layers": "7",
"bottom_shell_layers": "7",
"bridge_flow": "1",

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "ABeYedxpPRk7Mv4k",
"name": "0.10mm Standard @X-Max 4 0.2 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "ABeYedxpPRk7Mv4k",
"instantiation": "true",
"bottom_color_penetration_layers": "5",
"bottom_shell_layers": "5",
"bridge_flow": "1",

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "CcdlmUxcXQuw5HGG",
"name": "0.12mm Balanced Quality @X-Max 4 0.2 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "CcdlmUxcXQuw5HGG",
"instantiation": "true",
"bottom_color_penetration_layers": "5",
"bottom_shell_layers": "5",
"bridge_flow": "1",

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "LwuGo5RPFaXOdGOP",
"name": "0.12mm Fine @X-Max 4",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "LwuGo5RPFaXOdGOP",
"instantiation": "true",
"bottom_color_penetration_layers": "5",
"bottom_shell_layers": "7",
"bridge_flow": "1",

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "AhcbXuW6Py1OlLEz",
"name": "0.16mm Balanced Quality @X-Max 4",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "AhcbXuW6Py1OlLEz",
"instantiation": "true",
"bottom_color_penetration_layers": "4",
"bottom_shell_layers": "4",
"bridge_flow": "1",

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "JpZoDa8jLalawI6Q",
"name": "0.16mm Standard @X-Max 4",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "JpZoDa8jLalawI6Q",
"instantiation": "true",
"bottom_color_penetration_layers": "4",
"bottom_shell_layers": "4",
"bridge_flow": "1",

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "VRTEmrje8hig7qJc",
"name": "0.18mm Balanced Quality @X-Max 4 0.6 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "VRTEmrje8hig7qJc",
"instantiation": "true",
"bridge_flow": "1",
"bridge_speed": [
"30"

View File

@@ -1,9 +1,9 @@
{
"type": "process",
"setting_id": "oM72sw3mW85qL45A",
"name": "0.20mm Balanced Strength @X-Max 4",
"from": "system",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "oM72sw3mW85qL45A",
"instantiation": "true",
"bottom_shell_layers": "4",
"bridge_flow": "1",

View File

@@ -1,9 +1,9 @@
{
"type": "process",
"setting_id": "2TsaNedKJlTmULOi",
"name": "0.20mm Standard @X-Max 4",
"from": "system",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "2TsaNedKJlTmULOi",
"instantiation": "true",
"bridge_flow": "1",
"default_acceleration": [

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "kye0mwcHVzDEfide",
"name": "0.24mm Balanced Quality @X-Max 4 0.8 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "kye0mwcHVzDEfide",
"instantiation": "true",
"bridge_flow": "1",
"bridge_speed": [
"30"

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "FjwVknjxJnYTs3uo",
"name": "0.24mm Balanced Strength @X-Max 4 0.6 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "FjwVknjxJnYTs3uo",
"instantiation": "true",
"bridge_flow": "1",
"bridge_speed": [
"30"

View File

@@ -1,9 +1,9 @@
{
"type": "process",
"setting_id": "fJge4LaVkm7mmi3g",
"name": "0.24mm Standard @X-Max 4",
"from": "system",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "fJge4LaVkm7mmi3g",
"instantiation": "true",
"bridge_flow": "1",
"default_acceleration": [

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "TOsqMoGa5GvywEWI",
"name": "0.30mm Standard @X-Max 4 0.6 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "TOsqMoGa5GvywEWI",
"instantiation": "true",
"bridge_flow": "1",
"bridge_speed": [
"30"

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "U4yjBHhJwsHTIDHc",
"name": "0.32mm Balanced Strength @X-Max 4 0.8 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "U4yjBHhJwsHTIDHc",
"instantiation": "true",
"bridge_flow": "1",
"bridge_speed": [
"50"

View File

@@ -1,10 +1,10 @@
{
"type": "process",
"setting_id": "qT32mSKhstIeb8R2",
"name": "0.40mm Standard @X-Max 4 0.8 nozzle",
"from": "system",
"instantiation": "true",
"inherits": "fdm_process_n_common",
"from": "system",
"setting_id": "qT32mSKhstIeb8R2",
"instantiation": "true",
"bridge_flow": "1",
"bridge_speed": [
"30"