FIX:support different picture for different machine

jira: STUDIO-13919
Change-Id: I391887c637345795d3af82b3d274fb995c03b190
(cherry picked from commit 8979c2fbc10f49e257aa30b660ef9d09f00c90a1)
This commit is contained in:
zhou.xu
2025-09-10 18:03:15 +08:00
committed by Noisyfox
parent 2fd2ad0e8a
commit 38faa0ae46
2 changed files with 8 additions and 4 deletions

View File

@@ -2486,6 +2486,11 @@ bool Sidebar::reset_bed_type_combox_choices(bool is_sidebar_init)
}
auto pm = p->plater->get_curr_printer_model();
if (pm) {
if (m_cur_image_bed_type != pm->image_bed_type) {
m_cur_image_bed_type = pm->image_bed_type;
}
}
if (m_last_combo_bedtype_count != 0 && pm) {
auto cur_count = (int) BedType::btCount - 1 - pm->not_support_bed_types.size();
if (cur_count == m_last_combo_bedtype_count) {//no change
@@ -2497,9 +2502,6 @@ bool Sidebar::reset_bed_type_combox_choices(bool is_sidebar_init)
m_cur_combox_bed_types.clear();
if (pm &&bed_type_def && bed_type_def->enum_keys_map) {
int index = 0;
if (m_cur_image_bed_type != pm->image_bed_type) {
m_cur_image_bed_type = pm->image_bed_type;
}
for (auto item : bed_type_def->enum_labels) {
index++;
bool find = std::find(pm->not_support_bed_types.begin(), pm->not_support_bed_types.end(), item) != pm->not_support_bed_types.end();