mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 05:37:52 -06:00
ENABLE_CANVAS_TOOLTIP_USING_IMGUI set as default
This commit is contained in:
parent
b9f0b9eeda
commit
9487676680
6 changed files with 0 additions and 313 deletions
|
@ -479,22 +479,9 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
|||
int selected_object_idx = selection.get_object_idx();
|
||||
bool processed = false;
|
||||
|
||||
#if !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
// mouse anywhere
|
||||
if (!evt.Dragging() && !evt.Leaving() && !evt.Entering() && (m_mouse_capture.parent != nullptr))
|
||||
{
|
||||
if (m_mouse_capture.any() && (evt.LeftUp() || evt.MiddleUp() || evt.RightUp()))
|
||||
// prevents loosing selection into the scene if mouse down was done inside the toolbar and mouse up was down outside it
|
||||
processed = true;
|
||||
|
||||
m_mouse_capture.reset();
|
||||
}
|
||||
#endif // !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
|
||||
// mouse anywhere
|
||||
if (evt.Moving())
|
||||
m_tooltip = update_hover_state(mouse_pos);
|
||||
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
else if (evt.LeftUp())
|
||||
{
|
||||
if (m_mouse_capture.left)
|
||||
|
@ -559,24 +546,6 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
|||
// else
|
||||
// return false;
|
||||
}
|
||||
#else
|
||||
else if (evt.LeftUp())
|
||||
m_mouse_capture.left = false;
|
||||
else if (evt.MiddleUp())
|
||||
m_mouse_capture.middle = false;
|
||||
else if (evt.RightUp())
|
||||
{
|
||||
m_mouse_capture.right = false;
|
||||
if (pending_right_up)
|
||||
{
|
||||
pending_right_up = false;
|
||||
processed = true;
|
||||
}
|
||||
}
|
||||
else if (evt.Dragging() && m_mouse_capture.any())
|
||||
// if the button down was done on this toolbar, prevent from dragging into the scene
|
||||
processed = true;
|
||||
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
else if (evt.Dragging() && is_dragging())
|
||||
{
|
||||
if (!m_parent.get_wxglcanvas()->HasCapture())
|
||||
|
@ -674,29 +643,6 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
|||
m_parent.set_as_dirty();
|
||||
processed = true;
|
||||
}
|
||||
#if !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
else if (evt.LeftUp() && is_dragging())
|
||||
{
|
||||
switch (m_current) {
|
||||
case Move : m_parent.do_move(L("Gizmo-Move")); break;
|
||||
case Scale : m_parent.do_scale(L("Gizmo-Scale")); break;
|
||||
case Rotate : m_parent.do_rotate(L("Gizmo-Rotate")); break;
|
||||
default : break;
|
||||
}
|
||||
|
||||
stop_dragging();
|
||||
update_data();
|
||||
|
||||
wxGetApp().obj_manipul()->set_dirty();
|
||||
// Let the plater know that the dragging finished, so a delayed refresh
|
||||
// of the scene with the background processing data should be performed.
|
||||
m_parent.post_event(SimpleEvent(EVT_GLCANVAS_MOUSE_DRAGGING_FINISHED));
|
||||
// updates camera target constraints
|
||||
m_parent.refresh_camera_scene_box();
|
||||
|
||||
processed = true;
|
||||
}
|
||||
#endif // !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
else if (evt.LeftUp() && (m_current == SlaSupports || m_current == Hollow || m_current == FdmSupports) && !m_parent.is_mouse_dragging())
|
||||
{
|
||||
// in case SLA/FDM gizmo is selected, we just pass the LeftUp event and stop processing - neither
|
||||
|
@ -740,10 +686,6 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
|||
m_mouse_capture.right = true;
|
||||
m_mouse_capture.parent = &m_parent;
|
||||
}
|
||||
#if !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
else if (evt.LeftUp())
|
||||
processed = true;
|
||||
#endif // !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||
}
|
||||
|
||||
return processed;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue