Tech ENABLE_RELOAD_FROM_DISK_REWORK - A bunch of bug fixes in Reload from disk command:

1) Lost orientation after reload from disk (SPE-1182)

2) Wrong objects replacement from reload from disk command (SPE-1183)

3) Reload from disk not disabled for built-in models (SPE-1184)
This commit is contained in:
enricoturri1966 2022-02-02 14:25:36 +01:00
parent e709840977
commit 7d87490777
5 changed files with 287 additions and 62 deletions
src/slic3r/GUI

View file

@ -1691,16 +1691,16 @@ void ObjectList::load_shape_object(const std::string& type_name)
if (selection.get_object_idx() != -1)
return;
const int obj_idx = m_objects->size();
if (obj_idx < 0)
return;
take_snapshot(_L("Add Shape"));
// Create mesh
BoundingBoxf3 bb;
TriangleMesh mesh = create_mesh(type_name, bb);
load_mesh_object(mesh, _L("Shape") + "-" + _(type_name));
#if ENABLE_RELOAD_FROM_DISK_REWORK
if (!m_objects->empty())
m_objects->back()->volumes.front()->source.is_from_builtin_objects = true;
#endif // ENABLE_RELOAD_FROM_DISK_REWORK
wxGetApp().mainframe->update_title();
}