fix(preset): abgeleitete User-Presets bekommen eigene P-filament_id (Issue #52)

save_current_preset() generierte eine P-ID nur bei leerem filament_id.
Von Hersteller-Presets abgeleitete Presets erben aber dessen Vendor-ID
(z.B. GFA001), wodurch sync_ams_list() auf das Vendor-Preset zurueckfiel
statt das User-Preset zu waehlen. Bedingung an Preset::save() angeglichen:
auch non-P IDs werden jetzt durch eine eigene P-ID ersetzt.

Doku (DE/EN/ES) und Version auf 2.4.0-alpha-kx3 aktualisiert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
viewit
2026-06-09 13:00:45 +02:00
parent 1d32ed8f2b
commit 019fcf2423
3 changed files with 14 additions and 2 deletions

View File

@ -2852,7 +2852,7 @@ void PresetCollection::save_current_preset(const std::string &new_name, bool det
else if (m_type == Preset::TYPE_FILAMENT) {
preset.config.option<ConfigOptionStrings>("filament_settings_id", true)->values[0] = new_name;
// Generate a unique filament_id for user presets that don't have one yet (PR #13315).
if (preset.filament_id.empty()) {
if (preset.filament_id.empty() || preset.filament_id.front() != 'P') {
boost::uuids::detail::md5 hash;
boost::uuids::detail::md5::digest_type digest;
hash.process_bytes(new_name.data(), new_name.size());