mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-29 12:58:03 +00:00
Fix gizmo being closed after releasing mouse outside the gizmo floating window (#15095)
* Fix gizmo being closed after releasing mouse outside the gizmo floating window The left up event of a drag started on the gizmo floating window (e.g. selecting text in an input field) and released over the bed was treated as a click on the plate, which deselected the objects and closed the active gizmo. Add the ignore_left_up guard to the plate select branch, matching the deselect branch above. Co-Authored-By: Claude <noreply@anthropic.com> * Fix Emboss gizmo being closed after releasing mouse outside its floating window The Emboss gizmo has its own close-on-click-away handler (on_mouse_change_selection) that was not protected against left up events originating from ImGui windows, so the gizmo was still closed when a drag started on its floating window (e.g. selecting text in the input field) ended over the 3D scene. Expose the canvas's ignore_left_up state to gizmos and skip the close check for such releases. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1119,6 +1119,10 @@ public:
|
||||
|
||||
void set_mouse_as_dragging() { m_mouse.dragging = true; }
|
||||
bool is_mouse_dragging() const { return m_mouse.dragging; }
|
||||
// True when the current left up event comes from an ImGui window and was not processed by it
|
||||
// (e.g. a drag that started on a gizmo floating window and was released over the 3D scene).
|
||||
// Such a release is the end of an ImGui interaction, not a click on the scene.
|
||||
bool is_mouse_left_up_ignored() const { return m_mouse.ignore_left_up; }
|
||||
|
||||
double get_size_proportional_to_max_bed_size(double factor) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user