Skip to content

fix(gui): show indexed coFloatsOrPercents in unsaved changes (Orca #15472 adapt) - #48

Draft
aceRage wants to merge 1 commit into
mainfrom
cursor/orca-15472-unsaved-floats-percents-cbdd
Draft

aceRage wants to merge 1 commit into
mainfrom
cursor/orca-15472-unsaved-floats-percents-cbdd

Conversation

@aceRage

@aceRage aceRage commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Description

Port of OrcaSlicer #15472 (merged) onto Edge.

Indexed speed settings (coFloatsOrPercents, e.g. small_perimeter_speed#0) were missing or formatted wrong in Unsaved Changes after Orca OrcaSlicer#13712. This adapt lands the UI/search/test work without inventing Orca’s ConfigValueFormatter module (Edge formats inline in UnsavedChangesDialog::get_string_value).

Edge adapt

  • Inline coFloatsOrPercents formatting in get_string_value (absolute vs %, including whole-vector serialize when unindexed).
  • Add Search 3-arg get_option(opt_key, type, variant_index&) with safe miss (empty Option, variant_index = -2). Keep the 2-arg overload’s options[0] fallback for other callers.
  • Index coFloatsOrPercents in append_options (printer/SLA switch + print-level only; do not index every print vector type — Edge has no *_options_with_variant sets from Orca Add nozzle flow variant & make some options multi-variant OrcaSlicer/OrcaSlicer#13712).
  • Keep Edge PR Port Snapmaker/OrcaSlicer #848: preset diff crash guards and coFloatsOrPercents cereal #21 crash guards: unsaved/copy paths still synthesize labels for user-facing keys missing from the search index instead of falling back to options[0].
  • Extruder labels use edited-config *_extruder_variant / *_extruder_id; Normal/Silent suffixes when silent_mode is on for Machine limits.
  • deep_diff + apply_only handle per-slot coFloatsOrPercents / key#index so transfer of 5050% is index-accurate. Cereal is not touched.

Forbidden areas left untouched: CLI (Snapmaker_Orca.cpp), MixedFilament, wipe-tower, paint-depth.

Screenshots/Recordings/Graphs

Upstream screenshots live on Orca OrcaSlicer#15472. No GUI runtime in this environment to recapture Edge Unsaved Changes.

Tests

  • Added tests/libslic3r/test_preset_diff.cpp: deep_diff distinguishes absolute and percentage speeds for each variant ([PresetDiff][Config]). Uses Catch2 v2 (catch.hpp), not Orca’s v3 catch_all.hpp.
  • Catch2 status: not executed here — no configured build/ / deps in this environment. Please run:
cmake --build build --target libslic3r_tests --parallel
./build/tests/libslic3r/libslic3r_tests "[PresetDiff]" --order rand --warn NoAssertions
Open in Web Open in Cursor 

…caSlicer#15472 adapt)

Port OrcaSlicer OrcaSlicer#15472 onto Edge without adding ConfigValueFormatter.
Index coFloatsOrPercents in Search, add a 3-arg get_option with a safe
miss (empty Option, variant_index=-2), and format absolute vs percent
inline in UnsavedChangesDialog::get_string_value. Keep Edge #21 crash
guards so copy/unsaved-changes still shows keys absent from the search
index. deep_diff/apply_only gain per-slot coFloatsOrPercents transfer
so Catch2 can assert 50 vs 50% per variant. Cereal is untouched.

Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants