mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-06-07 04:20:15 -07:00
Drain holes are now saved in ModelObject
Internal changes in GLGizmoHollow.cpp
This commit is contained in:
@@ -750,20 +750,31 @@ bool GLGizmosManager::on_key(wxKeyEvent& evt)
|
||||
|
||||
if (evt.GetEventType() == wxEVT_KEY_UP)
|
||||
{
|
||||
if (m_current == SlaSupports)
|
||||
if (m_current == SlaSupports || m_current == Hollow)
|
||||
{
|
||||
GLGizmoSlaSupports* gizmo = dynamic_cast<GLGizmoSlaSupports*>(get_current());
|
||||
bool is_editing = true;
|
||||
bool is_rectangle_dragging = false;
|
||||
|
||||
if (m_current == SlaSupports) {
|
||||
GLGizmoSlaSupports* gizmo = dynamic_cast<GLGizmoSlaSupports*>(get_current());
|
||||
is_editing = gizmo->is_in_editing_mode();
|
||||
is_rectangle_dragging = gizmo->is_selection_rectangle_dragging();
|
||||
}
|
||||
else {
|
||||
GLGizmoHollow* gizmo = dynamic_cast<GLGizmoHollow*>(get_current());
|
||||
is_rectangle_dragging = gizmo->is_selection_rectangle_dragging();
|
||||
}
|
||||
|
||||
if (keyCode == WXK_SHIFT)
|
||||
{
|
||||
// shift has been just released - SLA gizmo might want to close rectangular selection.
|
||||
if (gizmo_event(SLAGizmoEventType::ShiftUp) || (gizmo->is_in_editing_mode() && gizmo->is_selection_rectangle_dragging()))
|
||||
if (gizmo_event(SLAGizmoEventType::ShiftUp) || (is_editing && is_rectangle_dragging))
|
||||
processed = true;
|
||||
}
|
||||
else if (keyCode == WXK_ALT)
|
||||
{
|
||||
// alt has been just released - SLA gizmo might want to close rectangular selection.
|
||||
if (gizmo_event(SLAGizmoEventType::AltUp) || (gizmo->is_in_editing_mode() && gizmo->is_selection_rectangle_dragging()))
|
||||
if (gizmo_event(SLAGizmoEventType::AltUp) || (is_editing && is_rectangle_dragging))
|
||||
processed = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user