ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING merged into ENABLE_CANVAS_TOOLTIP_USING_IMGUI
This commit is contained in:
parent
69ca14a695
commit
c300b66b7e
2 changed files with 8 additions and 10 deletions
|
@ -68,8 +68,6 @@
|
||||||
|
|
||||||
// Enable tooltips for GLCanvas3D using ImGUI
|
// Enable tooltips for GLCanvas3D using ImGUI
|
||||||
#define ENABLE_CANVAS_TOOLTIP_USING_IMGUI (1 && ENABLE_2_2_0_FINAL)
|
#define ENABLE_CANVAS_TOOLTIP_USING_IMGUI (1 && ENABLE_2_2_0_FINAL)
|
||||||
// Enable modified mouse events handling for gizmobar
|
|
||||||
#define ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING (1 && ENABLE_CANVAS_TOOLTIP_USING_IMGUI)
|
|
||||||
// Enable fix for dragging mouse event handling for gizmobar
|
// Enable fix for dragging mouse event handling for gizmobar
|
||||||
#define ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX (1 && ENABLE_2_2_0_FINAL)
|
#define ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX (1 && ENABLE_2_2_0_FINAL)
|
||||||
|
|
||||||
|
|
|
@ -456,7 +456,7 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
||||||
int selected_object_idx = selection.get_object_idx();
|
int selected_object_idx = selection.get_object_idx();
|
||||||
bool processed = false;
|
bool processed = false;
|
||||||
|
|
||||||
#if !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
|
#if !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
// mouse anywhere
|
// mouse anywhere
|
||||||
if (!evt.Dragging() && !evt.Leaving() && !evt.Entering() && (m_mouse_capture.parent != nullptr))
|
if (!evt.Dragging() && !evt.Leaving() && !evt.Entering() && (m_mouse_capture.parent != nullptr))
|
||||||
{
|
{
|
||||||
|
@ -466,12 +466,12 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
||||||
|
|
||||||
m_mouse_capture.reset();
|
m_mouse_capture.reset();
|
||||||
}
|
}
|
||||||
#endif // !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
|
#endif // !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
|
|
||||||
// mouse anywhere
|
// mouse anywhere
|
||||||
if (evt.Moving())
|
if (evt.Moving())
|
||||||
m_tooltip = update_hover_state(mouse_pos);
|
m_tooltip = update_hover_state(mouse_pos);
|
||||||
#if ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
|
#if ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
else if (evt.LeftUp())
|
else if (evt.LeftUp())
|
||||||
{
|
{
|
||||||
if (m_mouse_capture.left)
|
if (m_mouse_capture.left)
|
||||||
|
@ -557,7 +557,7 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
||||||
else if (evt.Dragging() && m_mouse_capture.any())
|
else if (evt.Dragging() && m_mouse_capture.any())
|
||||||
// if the button down was done on this toolbar, prevent from dragging into the scene
|
// if the button down was done on this toolbar, prevent from dragging into the scene
|
||||||
processed = true;
|
processed = true;
|
||||||
#endif // ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
|
#endif // ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
#if ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
|
#if ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
|
||||||
else if (evt.Dragging() && is_dragging())
|
else if (evt.Dragging() && is_dragging())
|
||||||
{
|
{
|
||||||
|
@ -696,7 +696,7 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
#endif // !ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
|
#endif // !ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
|
||||||
#if !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
|
#if !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
else if (evt.LeftUp() && is_dragging())
|
else if (evt.LeftUp() && is_dragging())
|
||||||
{
|
{
|
||||||
switch (m_current) {
|
switch (m_current) {
|
||||||
|
@ -718,7 +718,7 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
||||||
|
|
||||||
processed = true;
|
processed = true;
|
||||||
}
|
}
|
||||||
#endif // !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
|
#endif // !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
else if (evt.LeftUp() && (m_current == SlaSupports || m_current == Hollow) && !m_parent.is_mouse_dragging())
|
else if (evt.LeftUp() && (m_current == SlaSupports || m_current == Hollow) && !m_parent.is_mouse_dragging())
|
||||||
{
|
{
|
||||||
// in case SLA gizmo is selected, we just pass the LeftUp event and stop processing - neither
|
// in case SLA gizmo is selected, we just pass the LeftUp event and stop processing - neither
|
||||||
|
@ -757,10 +757,10 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
|
||||||
m_mouse_capture.right = true;
|
m_mouse_capture.right = true;
|
||||||
m_mouse_capture.parent = &m_parent;
|
m_mouse_capture.parent = &m_parent;
|
||||||
}
|
}
|
||||||
#if !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
|
#if !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
else if (evt.LeftUp())
|
else if (evt.LeftUp())
|
||||||
processed = true;
|
processed = true;
|
||||||
#endif // !ENABLE_MODIFIED_GIZMOBAR_MOUSE_EVENT_HANDLING
|
#endif // !ENABLE_CANVAS_TOOLTIP_USING_IMGUI
|
||||||
}
|
}
|
||||||
|
|
||||||
return processed;
|
return processed;
|
||||||
|
|
Loading…
Reference in a new issue