Follow-up 88f4fa20df
- Fixed next Linux specific issue : Select any instance in place where is active a gizmo space on instance
This commit is contained in:
parent
4c872b0352
commit
4b68fbd973
@ -24,14 +24,8 @@ GLGizmoFlatten::GLGizmoFlatten(GLCanvas3D& parent, const std::string& icon_filen
|
|||||||
|
|
||||||
bool GLGizmoFlatten::on_mouse(const wxMouseEvent &mouse_event)
|
bool GLGizmoFlatten::on_mouse(const wxMouseEvent &mouse_event)
|
||||||
{
|
{
|
||||||
if (mouse_event.Moving()) {
|
|
||||||
// only for sure
|
|
||||||
m_mouse_left_down = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (mouse_event.LeftDown()) {
|
if (mouse_event.LeftDown()) {
|
||||||
if (m_hover_id != -1) {
|
if (m_hover_id != -1) {
|
||||||
m_mouse_left_down = true;
|
|
||||||
Selection &selection = m_parent.get_selection();
|
Selection &selection = m_parent.get_selection();
|
||||||
if (selection.is_single_full_instance()) {
|
if (selection.is_single_full_instance()) {
|
||||||
// Rotate the object so the normal points downward:
|
// Rotate the object so the normal points downward:
|
||||||
@ -42,16 +36,8 @@ bool GLGizmoFlatten::on_mouse(const wxMouseEvent &mouse_event)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mouse_event.LeftUp()) {
|
else if (mouse_event.LeftUp())
|
||||||
if (m_mouse_left_down) {
|
return m_hover_id != -1;
|
||||||
// responsible for mouse left up after selecting plane
|
|
||||||
m_mouse_left_down = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (mouse_event.Leaving())
|
|
||||||
m_mouse_left_down = false;
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ private:
|
|||||||
|
|
||||||
std::vector<PlaneData> m_planes;
|
std::vector<PlaneData> m_planes;
|
||||||
std::vector<std::shared_ptr<SceneRaycasterItem>> m_planes_casters;
|
std::vector<std::shared_ptr<SceneRaycasterItem>> m_planes_casters;
|
||||||
bool m_mouse_left_down = false; // for detection left_up of this gizmo
|
|
||||||
const ModelObject* m_old_model_object = nullptr;
|
const ModelObject* m_old_model_object = nullptr;
|
||||||
int m_old_instance_id{ -1 };
|
int m_old_instance_id{ -1 };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user