Fix wrong plate y possition after switching profiles with different bed size #7923
+7
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is a long lasting bug that sometimes when you open existing projects with >= 3 build plates, sometimes every models on plate other than the first row get shifted down, especially when you have multiple printer profiles with different plate size:
Notice that, in the first image, the gaps between plates are rectangles:
However once you switched between profiles that have different bed size, the gaps changed to squares, as shown in image 2:
The vertical spacing changes after swithing profiles, this includes opening 3mf files that has a different plate size than current profile, which causes everything get shifted.
This PR fixes this issue.
Please be aware, that the square gap is the correct behavior! The vertical gaps should have never been greater than the horizental gaps (which was a bug introduced in version 1.6.2). This means after this fix, all existing projects saved from version 1.6.2+ that have more than 2 plates will have the model shifted down (or up, depends on whether you switched the printer profile before saving), which is unfortunate but a necessary pain.
Fix #4016
Fix #7917
The fix is cherrypicked from BBS, thanks!