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

(cherry picked from commit prusa3d/PrusaSlicer@96610ecea9)
This commit is contained in:
Filip Sykala 2023-10-19 14:41:51 +08:00 committed by Noisyfox
parent da4a70785d
commit 158bb47af3

View file

@ -3900,30 +3900,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().print_sequence == PrintSequence::ByObject)) { // 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().print_sequence == PrintSequence::ByObject)) {
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; }
} }
} }
else if (evt.LeftUp() && else if (evt.LeftUp() &&