Only on mouse up is emboss closed and only when no drag(move with scene) before was made.

This commit is contained in:
Filip Sykala - NTB T15p 2023-03-29 09:27:47 +02:00
parent adb6e00d4d
commit 85ee20dc8b

View file

@ -407,7 +407,8 @@ bool GLGizmoEmboss::on_mouse_for_translate(const wxMouseEvent &mouse_event)
void GLGizmoEmboss::on_mouse_change_selection(const wxMouseEvent &mouse_event)
{
if (mouse_event.LeftDown()) {
static bool was_dragging = true;
if ((mouse_event.LeftUp() || mouse_event.RightUp()) && !was_dragging) {
// is hovered volume closest hovered?
int hovered_idx = m_parent.get_first_hover_volume_idx();
if (hovered_idx < 0)
@ -430,6 +431,7 @@ void GLGizmoEmboss::on_mouse_change_selection(const wxMouseEvent &mouse_event)
// Reselection of text to another text
}
was_dragging = mouse_event.Dragging();
}
bool GLGizmoEmboss::on_mouse(const wxMouseEvent &mouse_event)