FIX: gizmo input window related issue

jira: no-jira

Change-Id: I829dc3416eb7b6714ac5b5f7bc7f99b272197ea1
This commit is contained in:
jun.zhang 2025-03-14 11:29:39 +08:00 committed by lane.wei
parent ee2d6bc9d5
commit 5656c89d32
5 changed files with 11 additions and 1 deletions

View File

@ -709,6 +709,13 @@ void GLGizmoBase::render_glmodel(GLModel &model, const std::array<float, 4> &col
}
}
void GLGizmoBase::on_set_state()
{
if (get_state() == Off) {
m_parent.handle_sidebar_focus_event("", false);
}
}
std::string GLGizmoBase::get_name(bool include_shortcut) const
{
int key = get_shortcut_key();

View File

@ -256,7 +256,7 @@ protected:
virtual void on_save(cereal::BinaryOutputArchive& ar) const {}
virtual std::string on_get_name() const = 0;
virtual std::string on_get_name_str() { return ""; }
virtual void on_set_state() {}
virtual void on_set_state();
virtual void on_set_hover_id() {}
virtual bool on_is_activable() const { return true; }
virtual bool on_is_selectable() const { return true; }

View File

@ -146,6 +146,7 @@ void GLGizmoMove3D::on_set_state() {
m_last_selected_volume_idx = -1;
change_cs_by_selection();
}
GLGizmoBase::on_set_state();
}
void GLGizmoMove3D::on_start_dragging()

View File

@ -676,6 +676,7 @@ void GLGizmoRotate3D::on_set_state()
m_object_manipulation->set_coordinates_type(ECoordinatesType::World);
m_last_volume = nullptr;
}
GLGizmoBase::on_set_state();
}
void GLGizmoRotate3D::data_changed(bool is_serializing) {

View File

@ -177,6 +177,7 @@ void GLGizmoScale3D::on_set_state() {
m_last_selected_volume_idx = -1;
change_cs_by_selection();
}
GLGizmoBase::on_set_state();
}
static int constraint_id(int grabber_id)