Fixed "split to part" for Undo/Redo stack
This commit is contained in:
parent
c6604ff55d
commit
628d2a2614
@ -1972,13 +1972,15 @@ void ObjectList::split()
|
|||||||
DynamicPrintConfig& config = printer_config();
|
DynamicPrintConfig& config = printer_config();
|
||||||
const ConfigOption *nozzle_dmtrs_opt = config.option("nozzle_diameter", false);
|
const ConfigOption *nozzle_dmtrs_opt = config.option("nozzle_diameter", false);
|
||||||
const auto nozzle_dmrs_cnt = (nozzle_dmtrs_opt == nullptr) ? size_t(1) : dynamic_cast<const ConfigOptionFloats*>(nozzle_dmtrs_opt)->values.size();
|
const auto nozzle_dmrs_cnt = (nozzle_dmtrs_opt == nullptr) ? size_t(1) : dynamic_cast<const ConfigOptionFloats*>(nozzle_dmtrs_opt)->values.size();
|
||||||
if (volume->split(nozzle_dmrs_cnt) == 1) {
|
if (!volume->is_splittable()) {
|
||||||
wxMessageBox(_(L("The selected object couldn't be split because it contains only one part.")));
|
wxMessageBox(_(L("The selected object couldn't be split because it contains only one part.")));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
take_snapshot(_(L("Split to Parts")));
|
take_snapshot(_(L("Split to Parts")));
|
||||||
|
|
||||||
|
volume->split(nozzle_dmrs_cnt);
|
||||||
|
|
||||||
wxBusyCursor wait;
|
wxBusyCursor wait;
|
||||||
|
|
||||||
auto model_object = (*m_objects)[obj_idx];
|
auto model_object = (*m_objects)[obj_idx];
|
||||||
|
Loading…
Reference in New Issue
Block a user