mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-19 00:42:18 +00:00
* Fix reload from disk for STEP models after reopening a project (#12992) reload_from_disk matched reloaded source volumes with an exact source.input_file string comparison. After a project is saved and reopened, the stored source path is only the filename (the default, non-full-path save) while a freshly re-imported volume carries a full path, so the comparison never matched: reload fell into fail_list and the "locate file" dialog was effectively useless for STEP models. Fall back to a case-insensitive filename comparison when the exact paths differ, so the existing same-folder source lookup (and the locate dialog) can reload the model. Projects that stored absolute source paths still match exactly as before; no 3mf format change. * Add Preferences option to store full source paths in projects Expose the existing export_sources_full_pathnames setting (previously only editable in the config file) as a checkbox under Preferences > General > Project. Enabling it stores absolute source paths in saved projects, so "Reload from disk" works when the source file is kept in a different folder than the project (companion to #12992).
This commit is contained in:
@@ -1664,6 +1664,13 @@ void PreferencesDialog::create_items()
|
||||
);
|
||||
g_sizer->Add(item_draco_bits);
|
||||
|
||||
auto item_full_source_paths = create_item_checkbox(_L("Store full source file paths in projects"),
|
||||
_L("If enabled, saved projects store the absolute path to imported source files (STEP/STL/...), so "
|
||||
"\"Reload from disk\" still works when the source file is kept in a different folder than the project. "
|
||||
"If disabled, only the filename is stored, which keeps projects portable and avoids embedding absolute paths."),
|
||||
"export_sources_full_pathnames");
|
||||
g_sizer->Add(item_full_source_paths);
|
||||
|
||||
//// GENERAL > Preset
|
||||
g_sizer->Add(create_item_title(_L("Preset")), 1, wxEXPAND);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user