Suggestion to detect volume modification instead of check some gizmos during dragging

This commit is contained in:
Filip Sykala 2021-12-08 15:32:13 +01:00
parent 209eda75a0
commit 96610ecea9

View File

@ -2989,30 +2989,24 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
m_mouse.set_start_position_3D_as_invalid(); m_mouse.set_start_position_3D_as_invalid();
m_mouse.position = pos.cast<double>(); m_mouse.position = pos.cast<double>();
if (evt.Dragging() && current_printer_technology() == ptFFF && fff_print()->config().complete_objects) { // It should be detection of volume change
switch (m_gizmos.get_current_type()) // Not only detection of some modifiers !!!
{ if (evt.Dragging()) {
case GLGizmosManager::EType::Move: if (current_printer_technology() == ptFFF &&
case GLGizmosManager::EType::Scale: fff_print()->config().complete_objects) {
case GLGizmosManager::EType::Rotate: switch (m_gizmos.get_current_type()) {
{ case GLGizmosManager::EType::Move:
update_sequential_clearance(); case GLGizmosManager::EType::Scale:
break; case GLGizmosManager::EType::Rotate:
} update_sequential_clearance();
default: { break; } }
} } else {
} switch (m_gizmos.get_current_type()) {
else if (evt.Dragging()) { case GLGizmosManager::EType::Move:
switch (m_gizmos.get_current_type()) case GLGizmosManager::EType::Scale:
{ case GLGizmosManager::EType::Rotate:
case GLGizmosManager::EType::Move: show_sinking_contours();
case GLGizmosManager::EType::Scale: }
case GLGizmosManager::EType::Rotate:
{
show_sinking_contours();
break;
}
default: { break; }
} }
} }