Fix wrong plate y possition after switching profiles with different bed size (#7923)

* FIX:update custom_texture when new_shape=false

Jira: STUDIO-5287
Change-Id: I3add95f9f9345c14a48cc7467513d1b3ce95f4c9
(cherry picked from commit 9ce7de10f4)

* FIX: correct the bed model to the print area origin point

Change-Id: Ieb856dff421d39694966e3c13c519f4ffa3da5c2
(cherry picked from commit 32892514ff)

* Avoid unnecessary copy of `position` parameter

* Merge branch 'main' into bugfox/plater-y
This commit is contained in:
Noisyfox 2025-01-25 11:50:30 +08:00 committed by GitHub
parent 3c3ac1a1cb
commit 4a4f27e599
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 11 deletions

View file

@ -8162,13 +8162,14 @@ void Plater::priv::set_bed_shape(const Pointfs& shape, const Pointfs& exclude_ar
float prev_height_lid, prev_height_rod;
partplate_list.get_height_limits(prev_height_lid, prev_height_rod);
auto prev_logo = partplate_list.get_logo_texture_filename();
double height_to_lid = config->opt_float("extruder_clearance_height_to_lid");
double height_to_rod = config->opt_float("extruder_clearance_height_to_rod");
auto custom_bed_texture = config->opt_string("bed_custom_texture");
Pointfs prev_exclude_areas = partplate_list.get_exclude_area();
new_shape |= (height_to_lid != prev_height_lid) || (height_to_rod != prev_height_rod) || (prev_exclude_areas != exclude_areas) || (prev_logo != custom_bed_texture);
new_shape |= (height_to_lid != prev_height_lid) || (height_to_rod != prev_height_rod) || (prev_exclude_areas != exclude_areas);
if (!new_shape && partplate_list.get_logo_texture_filename() != custom_texture) {
partplate_list.update_logo_texture_filename(custom_texture);
}
if (new_shape) {
if (view3D) view3D->bed_shape_changed();
if (preview) preview->bed_shape_changed();