mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-20 03:24:24 +08:00
Fixed camera jump after object rotate
This commit is contained in:
parent
09de343e65
commit
2f7876b852
@ -1941,17 +1941,22 @@ void GLCanvas3D::set_model(Model* model)
|
|||||||
|
|
||||||
void GLCanvas3D::set_bed_shape(const Pointfs& shape)
|
void GLCanvas3D::set_bed_shape(const Pointfs& shape)
|
||||||
{
|
{
|
||||||
m_bed.set_shape(shape);
|
bool new_shape = (shape != m_bed.get_shape());
|
||||||
|
if (new_shape)
|
||||||
|
m_bed.set_shape(shape);
|
||||||
|
|
||||||
// Set the origin and size for painting of the coordinate system axes.
|
// Set the origin and size for painting of the coordinate system axes.
|
||||||
m_axes.origin = Pointf3(0.0, 0.0, (coordf_t)GROUND_Z);
|
m_axes.origin = Pointf3(0.0, 0.0, (coordf_t)GROUND_Z);
|
||||||
set_axes_length(0.3f * (float)m_bed.get_bounding_box().max_size());
|
set_axes_length(0.3f * (float)m_bed.get_bounding_box().max_size());
|
||||||
|
|
||||||
// forces the selection of the proper camera target
|
if (new_shape)
|
||||||
if (m_volumes.volumes.empty())
|
{
|
||||||
zoom_to_bed();
|
// forces the selection of the proper camera target
|
||||||
else
|
if (m_volumes.volumes.empty())
|
||||||
zoom_to_volumes();
|
zoom_to_bed();
|
||||||
|
else
|
||||||
|
zoom_to_volumes();
|
||||||
|
}
|
||||||
|
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user