Skip to content

Keep Auto Drop off for projects saved by 2.4.x - #16633

Merged
Noisyfox merged 1 commit into
mainfrom
fix/auto-drop-off
Oct 19, 2026
Merged

Noisyfox merged 1 commit into
mainfrom
fix/auto-drop-off

Conversation

@lamweilun

Copy link
Copy Markdown
Contributor

Description

Fixes #16624.

Projects saved by 2.4.0 to 2.4.2 store Auto Drop on each build item, and the object has no auto_drop attribute in model_settings.config. Since #15465 the importer reads only the object attribute and treats a missing one as on. Floating objects in those projects are dropped to the bed on load, and the flag is saved back as on.

Changes in src/libslic3r/Format/bbs_3mf.cpp:

  • ObjectMetadata::auto_drop is std::optional<bool>, set only when the object has the attribute.
  • _handle_start_item records object ids with a build item auto_drop="0" in m_items_auto_drop_off. The set is cleared with the other import state.
  • Object creation uses the object attribute when present, otherwise the legacy item flag. Any item set to off turns Auto Drop off for the object, since the flag is shared by all instances. This also applies to objects with no config entry.

Projects already saved by main or v2.5.0-alpha have auto_drop="1" written back and are not recovered by this change.

Screenshots/Recordings/Graphs

N/A

Tests

  • New regression test A project in the 2.4.x layout keeps auto drop off from its build item in tests/libslic3r/test_3mf.cpp. It saves a cube with Auto Drop off, moves the flag to the build item the way 2.4.x wrote it, loads the project, and checks the object's Auto Drop is still off.
  • Tested locally by the author.

How to Download Pull Requests Artifacts for Testing

2.4.0 to 2.4.2 wrote auto_drop on each build item, and 2.4.x objects
carry no auto_drop attribute in model_settings.config. The importer only
read the object attribute and treated a missing one as on, so floating
objects were dropped to the bed on load and the flag was rewritten as on
on the next save.

Record object ids with an item auto_drop="0" and use that as the fallback
when the object has no attribute. The attribute's presence is now tracked
so the fallback applies only when it is absent. Any item set to off turns
auto drop off for the object, since the flag is shared by all instances.
@github-actions

Copy link
Copy Markdown

Hi @lamweilun, you can manage the labels for this PR by /bot add-label and /bot remove-label

Allowed labels are:
crash, bug-fix, SECURITY, enhancement, QoL, optimization, UI/UX, profile, Localization, build, test, dependencies and documentation.

Examples:

/bot add-label bug-fix
/bot add-label bug-fix, UI/UX
/bot remove-label bug-fix, UI/UX

@lamweilun

Copy link
Copy Markdown
Contributor Author

/bot add-label bug-fix

@github-actions github-actions Bot added the bug-fix Fix for incorrect behavior, not a crash label Oct 19, 2026
@lamweilun lamweilun self-assigned this Oct 19, 2026
@github-actions

Copy link
Copy Markdown

Test Results

     7 files  ±0       7 suites  ±0   1h 3m 43s ⏱️ - 13m 25s
 2 342 tests +1   2 342 ✅ +1   0 💤 ±0  0 ❌ ±0 
16 344 runs  +7  16 320 ✅ +7  24 💤 ±0  0 ❌ ±0 

Results for commit 7b24bbf. ± Comparison against base commit d3699dd.

@Noisyfox Noisyfox left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@Noisyfox
Noisyfox merged commit 4c2ae6d into main Oct 19, 2026
55 checks passed
@Noisyfox
Noisyfox deleted the fix/auto-drop-off branch October 19, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Fix for incorrect behavior, not a crash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Projects saved by 2.4.x lose "Auto Drop" off: floating objects are dropped to the bed on load (regression from #15465)

2 participants