From b0330dff3602cd2b735953c78870595034d8c762 Mon Sep 17 00:00:00 2001 From: "liz.li" Date: Fri, 22 Mar 2024 12:31:13 +0800 Subject: [PATCH] FIX: do not check spiral vase mode config if an object is loaded jira: STUDIO-6514 Change-Id: Ib44ec8322ff178b5765f7fe94b588aa38339691d --- src/slic3r/GUI/GUI_ObjectList.cpp | 2 +- src/slic3r/GUI/PartPlate.cpp | 12 +++++++----- src/slic3r/GUI/PartPlate.hpp | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index c1baf13e8..2c9138733 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -3704,7 +3704,7 @@ void ObjectList::add_object_to_list(size_t obj_idx, bool call_selection_changed, //BBS start add obj_idx for debug PartPlateList& list = wxGetApp().plater()->get_partplate_list(); if (notify_partplate) { - list.notify_instance_update(obj_idx, 0); + list.notify_instance_update(obj_idx, 0, true); } //int plate_idx = list.find_instance_belongs(obj_idx, 0); //std::string item_name_str = (boost::format("[P%1%][O%2%]%3%") % plate_idx % std::to_string(obj_idx) % model_object->name).str(); diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 6819e0cf0..af33fdd2d 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -4180,7 +4180,7 @@ int PartPlateList::find_instance_belongs(int obj_id, int instance_id) //notify instance's update, need to refresh the instance in plates //newly added or modified -int PartPlateList::notify_instance_update(int obj_id, int instance_id) +int PartPlateList::notify_instance_update(int obj_id, int instance_id, bool is_new) { int ret = 0, index; PartPlate* plate = NULL; @@ -4278,10 +4278,12 @@ int PartPlateList::notify_instance_update(int obj_id, int instance_id) plate->add_instance(obj_id, instance_id, false, &boundingbox); // spiral mode, update object setting - if (plate->config()->has("spiral_mode") && plate->config()->opt_bool("spiral_mode") && !is_object_config_compatible_with_spiral_vase(object)) { - auto answer = static_cast(wxGetApp().plate_tab)->show_spiral_mode_settings_dialog(true); - if (answer == wxID_YES) { - plate->set_vase_mode_related_object_config(obj_id); + if (!is_new) { + if (plate->config()->has("spiral_mode") && plate->config()->opt_bool("spiral_mode") && !is_object_config_compatible_with_spiral_vase(object)) { + auto answer = static_cast(wxGetApp().plate_tab)->show_spiral_mode_settings_dialog(true); + if (answer == wxID_YES) { + plate->set_vase_mode_related_object_config(obj_id); + } } } diff --git a/src/slic3r/GUI/PartPlate.hpp b/src/slic3r/GUI/PartPlate.hpp index 218e92733..7a4edc835 100644 --- a/src/slic3r/GUI/PartPlate.hpp +++ b/src/slic3r/GUI/PartPlate.hpp @@ -760,7 +760,7 @@ public: int find_instance_belongs(int obj_id, int instance_id); //notify instance's update, need to refresh the instance in plates - int notify_instance_update(int obj_id, int instance_id); + int notify_instance_update(int obj_id, int instance_id, bool is_new = false); //notify instance is removed int notify_instance_removed(int obj_id, int instance_id);