Fixed a crash on deleting object with SLA gizmo active

Rephrased text informing about hidden objects in both SLA gizmos
This commit is contained in:
Lukas Matena 2020-02-04 15:01:23 +01:00
parent 0e3ebb3e07
commit 617912ecc1
2 changed files with 3 additions and 1 deletions

View file

@ -683,7 +683,7 @@ void GLCanvas3D::WarningTexture::activate(WarningTexture::Warning warning, bool
case ObjectOutside : text = L("An object outside the print area was detected"); break; case ObjectOutside : text = L("An object outside the print area was detected"); break;
case ToolpathOutside : text = L("A toolpath outside the print area was detected"); break; case ToolpathOutside : text = L("A toolpath outside the print area was detected"); break;
case SlaSupportsOutside : text = L("SLA supports outside the print area were detected"); break; case SlaSupportsOutside : text = L("SLA supports outside the print area were detected"); break;
case SomethingNotShown : text = L("Some objects are not visible when editing supports"); break; case SomethingNotShown : text = L("Some objects are not visible"); break;
case ObjectClashed: { case ObjectClashed: {
text = L("An object outside the print area was detected\n" text = L("An object outside the print area was detected\n"
"Resolve the current problem to continue slicing"); "Resolve the current problem to continue slicing");

View file

@ -1291,6 +1291,8 @@ bool GLGizmoSlaSupports::unsaved_changes() const
void GLGizmoSlaSupports::update_clipping_plane(bool keep_normal) const void GLGizmoSlaSupports::update_clipping_plane(bool keep_normal) const
{ {
if (! m_c->m_model_object)
return;
Vec3d normal = (keep_normal && m_c->m_clipping_plane->get_normal() != Vec3d::Zero() ? Vec3d normal = (keep_normal && m_c->m_clipping_plane->get_normal() != Vec3d::Zero() ?
m_c->m_clipping_plane->get_normal() : -m_parent.get_camera().get_dir_forward()); m_c->m_clipping_plane->get_normal() : -m_parent.get_camera().get_dir_forward());