FIX:add can_sequential_clearance_show_in_gizmo api
jira: STUDIO-7836 Change-Id: Ie0cded272596bafee4e491e379722dcc23035dc4
This commit is contained in:
parent
10e41fbd07
commit
715d2b9b78
|
@ -4076,16 +4076,8 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||||
m_mouse.position = pos.cast<double>();
|
m_mouse.position = pos.cast<double>();
|
||||||
|
|
||||||
if (evt.Dragging() && current_printer_technology() == ptFFF && (fff_print()->config().print_sequence == PrintSequence::ByObject)) {
|
if (evt.Dragging() && current_printer_technology() == ptFFF && (fff_print()->config().print_sequence == PrintSequence::ByObject)) {
|
||||||
switch (m_gizmos.get_current_type())
|
if (can_sequential_clearance_show_in_gizmo()) {
|
||||||
{
|
|
||||||
case GLGizmosManager::EType::Move:
|
|
||||||
case GLGizmosManager::EType::Scale:
|
|
||||||
case GLGizmosManager::EType::Rotate:
|
|
||||||
{
|
|
||||||
update_sequential_clearance();
|
update_sequential_clearance();
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: { break; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (evt.Dragging()) {
|
else if (evt.Dragging()) {
|
||||||
|
@ -5266,6 +5258,17 @@ void GLCanvas3D::mouse_up_cleanup()
|
||||||
m_canvas->ReleaseMouse();
|
m_canvas->ReleaseMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GLCanvas3D::can_sequential_clearance_show_in_gizmo() {
|
||||||
|
switch (m_gizmos.get_current_type()) {
|
||||||
|
case GLGizmosManager::EType::Move:
|
||||||
|
case GLGizmosManager::EType::Scale:
|
||||||
|
case GLGizmosManager::EType::Rotate: {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void GLCanvas3D::update_sequential_clearance()
|
void GLCanvas3D::update_sequential_clearance()
|
||||||
{
|
{
|
||||||
if (current_printer_technology() != ptFFF || (fff_print()->config().print_sequence == PrintSequence::ByLayer))
|
if (current_printer_technology() != ptFFF || (fff_print()->config().print_sequence == PrintSequence::ByLayer))
|
||||||
|
@ -7283,19 +7286,11 @@ void GLCanvas3D::_render_sequential_clearance()
|
||||||
{
|
{
|
||||||
if (m_gizmos.is_dragging())
|
if (m_gizmos.is_dragging())
|
||||||
return;
|
return;
|
||||||
|
auto type = m_gizmos.get_current_type();
|
||||||
switch (m_gizmos.get_current_type())
|
if (type == GLGizmosManager::EType::Undefined
|
||||||
{
|
|| can_sequential_clearance_show_in_gizmo()) {
|
||||||
case GLGizmosManager::EType::Flatten:
|
m_sequential_print_clearance.render();
|
||||||
case GLGizmosManager::EType::Cut:
|
|
||||||
case GLGizmosManager::EType::Hollow:
|
|
||||||
case GLGizmosManager::EType::SlaSupports:
|
|
||||||
case GLGizmosManager::EType::FdmSupports:
|
|
||||||
case GLGizmosManager::EType::Seam: { return; }
|
|
||||||
default: { break; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sequential_print_clearance.render();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_RENDER_SELECTION_CENTER
|
#if ENABLE_RENDER_SELECTION_CENTER
|
||||||
|
|
|
@ -1073,6 +1073,7 @@ public:
|
||||||
m_sequential_print_clearance.set_polygons(polygons, height_polygons);
|
m_sequential_print_clearance.set_polygons(polygons, height_polygons);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool can_sequential_clearance_show_in_gizmo();
|
||||||
void update_sequential_clearance();
|
void update_sequential_clearance();
|
||||||
|
|
||||||
const Print* fff_print() const;
|
const Print* fff_print() const;
|
||||||
|
|
Loading…
Reference in New Issue