FIX: seam: fix erasing all not work issue

Signed-off-by: yifan.wu <yifan.wu@bambulab.com>
Change-Id: I9ea252e3279ae64a69299022d04f40cbbdfcd44c
This commit is contained in:
yifan.wu 2022-08-02 17:59:45 +08:00 committed by Lane.Wei
parent afa549d410
commit ffad75903d
3 changed files with 5 additions and 9 deletions

View File

@ -38,7 +38,7 @@ bool GLGizmoSeam::on_init()
m_desc["block"] = _L("Block seam"); m_desc["block"] = _L("Block seam");
m_desc["remove_caption"] = _L("Shift + Left mouse button") + ": "; m_desc["remove_caption"] = _L("Shift + Left mouse button") + ": ";
m_desc["remove"] = _L("Remove selection"); m_desc["remove"] = _L("Remove selection");
m_desc["remove_all"] = _L("Remove all selection"); m_desc["remove_all"] = _L("Erase all painting");
m_desc["circle"] = _L("Circle"); m_desc["circle"] = _L("Circle");
m_desc["sphere"] = _L("Sphere"); m_desc["sphere"] = _L("Sphere");
@ -307,7 +307,7 @@ void GLGizmoSeam::on_render_input_window(float x, float y, float bottom_limit)
if (mv->is_model_part()) { if (mv->is_model_part()) {
++idx; ++idx;
m_triangle_selectors[idx]->reset(); m_triangle_selectors[idx]->reset();
m_triangle_selectors[idx]->request_update_render_data(); m_triangle_selectors[idx]->request_update_render_data(true);
} }
update_model_object(); update_model_object();

View File

@ -145,9 +145,9 @@ bool GLGizmosManager::init()
m_gizmos.emplace_back(new GLGizmoFlatten(m_parent, "toolbar_flatten.svg", EType::Flatten)); m_gizmos.emplace_back(new GLGizmoFlatten(m_parent, "toolbar_flatten.svg", EType::Flatten));
m_gizmos.emplace_back(new GLGizmoAdvancedCut(m_parent, "toolbar_cut.svg", EType::Cut)); m_gizmos.emplace_back(new GLGizmoAdvancedCut(m_parent, "toolbar_cut.svg", EType::Cut));
m_gizmos.emplace_back(new GLGizmoFdmSupports(m_parent, "toolbar_support.svg", EType::FdmSupports)); m_gizmos.emplace_back(new GLGizmoFdmSupports(m_parent, "toolbar_support.svg", EType::FdmSupports));
m_gizmos.emplace_back(new GLGizmoSeam(m_parent, "toolbar_seam.svg", EType::Seam));
m_gizmos.emplace_back(new GLGizmoMmuSegmentation(m_parent, "mmu_segmentation.svg", EType::MmuSegmentation)); m_gizmos.emplace_back(new GLGizmoMmuSegmentation(m_parent, "mmu_segmentation.svg", EType::MmuSegmentation));
m_gizmos.emplace_back(new GLGizmoSimplify(m_parent, "reduce_triangles.svg", EType::Simplify)); m_gizmos.emplace_back(new GLGizmoSimplify(m_parent, "reduce_triangles.svg", EType::Simplify));
m_gizmos.emplace_back(new GLGizmoSeam(m_parent, "toolbar_seam.svg", EType::Seam));
//m_gizmos.emplace_back(new GLGizmoSlaSupports(m_parent, "sla_supports.svg", sprite_id++)); //m_gizmos.emplace_back(new GLGizmoSlaSupports(m_parent, "sla_supports.svg", sprite_id++));
//m_gizmos.emplace_back(new GLGizmoFaceDetector(m_parent, "face recognition.svg", sprite_id++)); //m_gizmos.emplace_back(new GLGizmoFaceDetector(m_parent, "face recognition.svg", sprite_id++));
//m_gizmos.emplace_back(new GLGizmoHollow(m_parent, "hollow.svg", sprite_id++)); //m_gizmos.emplace_back(new GLGizmoHollow(m_parent, "hollow.svg", sprite_id++));
@ -518,12 +518,8 @@ void GLGizmosManager::set_painter_gizmo_data()
return; return;
dynamic_cast<GLGizmoFdmSupports*>(m_gizmos[FdmSupports].get())->set_painter_gizmo_data(m_parent.get_selection()); dynamic_cast<GLGizmoFdmSupports*>(m_gizmos[FdmSupports].get())->set_painter_gizmo_data(m_parent.get_selection());
dynamic_cast<GLGizmoSeam*>(m_gizmos[Seam].get())->set_painter_gizmo_data(m_parent.get_selection());
dynamic_cast<GLGizmoMmuSegmentation*>(m_gizmos[MmuSegmentation].get())->set_painter_gizmo_data(m_parent.get_selection()); dynamic_cast<GLGizmoMmuSegmentation*>(m_gizmos[MmuSegmentation].get())->set_painter_gizmo_data(m_parent.get_selection());
if (Seam < m_gizmos.size()) {
GLGizmoSeam* gizmo_seam = dynamic_cast<GLGizmoSeam*>(m_gizmos[Seam].get());
if (gizmo_seam != nullptr)
gizmo_seam->set_painter_gizmo_data(m_parent.get_selection());
}
} }
// Returns true if the gizmo used the event to do something, false otherwise. // Returns true if the gizmo used the event to do something, false otherwise.

View File

@ -71,9 +71,9 @@ public:
Flatten, Flatten,
Cut, Cut,
FdmSupports, FdmSupports,
Seam,
MmuSegmentation, MmuSegmentation,
Simplify, Simplify,
Seam,
SlaSupports, SlaSupports,
// BBS // BBS
//FaceRecognition, //FaceRecognition,