Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2019-07-18 18:41:47 +0300
committerbubnikv <bubnikv@gmail.com>2019-07-18 18:41:47 +0300
commita0ea96968d9097ad2f329e1e34bf207d955bed04 (patch)
tree5f169187c087e74a24009acf129dc7726b8da9f1 /src/slic3r/GUI/GUI_ObjectManipulation.cpp
parent631a952f94b9307eb1d696d9f0dfcb2ed1da799a (diff)
Storing the active printer technology onto the Undo / Redo stack,
remembering the last selected Printer profile for the SLA and FDM technologies separately, and activating them on Undo / Redo. When switching the technologies, user is asked whether to discard the modified profiles or not.
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectManipulation.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectManipulation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
index fcb047139..308b3f208 100644
--- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp
+++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
@@ -25,7 +25,7 @@ static double get_volume_min_z(const GLVolume* volume)
const Transform3f& world_matrix = volume->world_matrix().cast<float>();
// need to get the ModelVolume pointer
- const ModelObject* mo = wxGetApp().model_objects()->at(volume->composite_id.object_id);
+ const ModelObject* mo = wxGetApp().model().objects[volume->composite_id.object_id];
const ModelVolume* mv = mo->volumes[volume->composite_id.volume_id];
const TriangleMesh& hull = mv->get_convex_hull();
@@ -466,7 +466,7 @@ void ObjectManipulation::update_settings_value(const Selection& selection)
m_new_scale = m_new_size.cwiseProduct(selection.get_unscaled_instance_bounding_box().size().cwiseInverse()) * 100.;
} else {
m_new_rotation = volume->get_instance_rotation() * (180. / M_PI);
- m_new_size = volume->get_instance_transformation().get_scaling_factor().cwiseProduct((*wxGetApp().model_objects())[volume->object_idx()]->raw_mesh_bounding_box().size());
+ m_new_size = volume->get_instance_transformation().get_scaling_factor().cwiseProduct(wxGetApp().model().objects[volume->object_idx()]->raw_mesh_bounding_box().size());
m_new_scale = volume->get_instance_scaling_factor() * 100.;
}
@@ -779,7 +779,7 @@ void ObjectManipulation::change_size_value(int axis, double value)
else if (selection.is_single_full_instance())
ref_size = m_world_coordinates ?
selection.get_unscaled_instance_bounding_box().size() :
- (*wxGetApp().model_objects())[selection.get_volume(*selection.get_volume_idxs().begin())->object_idx()]->raw_mesh_bounding_box().size();
+ wxGetApp().model().objects[selection.get_volume(*selection.get_volume_idxs().begin())->object_idx()]->raw_mesh_bounding_box().size();
this->do_scale(axis, 100. * Vec3d(size(0) / ref_size(0), size(1) / ref_size(1), size(2) / ref_size(2)));
@@ -902,7 +902,7 @@ void ObjectManipulation::set_uniform_scaling(const bool new_value)
return;
}
// Bake the rotation into the meshes of the object.
- (*wxGetApp().model_objects())[volume->composite_id.object_id]->bake_xy_rotation_into_meshes(volume->composite_id.instance_id);
+ wxGetApp().model().objects[volume->composite_id.object_id]->bake_xy_rotation_into_meshes(volume->composite_id.instance_id);
// Update the 3D scene, selections etc.
wxGetApp().plater()->update();
// Recalculate cached values at this panel, refresh the screen.