diff options
author | YuSanka <yusanka@gmail.com> | 2021-12-04 12:05:00 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2021-12-04 12:05:14 +0300 |
commit | 8a2c15ad606a42732d992fea66ae2fb8a483d119 (patch) | |
tree | f7498f4f1b6f4418b406b36077998ae922fb00a6 | |
parent | 6122f630d4cb8debb28a232d1ee0290f9ba4ceee (diff) |
Fix for #7408 - Crash after closing error for deleting box shape with cylinder negative volume
-rw-r--r-- | src/slic3r/GUI/Plater.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index c721419a4..dd1ccb91f 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -1260,7 +1260,11 @@ void Sidebar::show_info_sizer() if (selection.is_single_volume()) { std::vector<int> obj_idxs, vol_idxs; wxGetApp().obj_list()->get_selection_indexes(obj_idxs, vol_idxs); - assert(vol_idxs.size() == 1); + if (vol_idxs.size() != 1) + // Case when this fuction is called between update selection in ObjectList and on Canvas + // Like after try to delete last solid part in object, the object is selected in ObjectLIst when just a part is still selected on Canvas + // see https://github.com/prusa3d/PrusaSlicer/issues/7408 + return; vol = model_object->volumes[vol_idxs[0]]; t = model_object->instances[inst_idx]->get_matrix() * vol->get_matrix(); } |