summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-29 16:48:03 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-29 16:48:03 +0100
commit447f6998b1ac90feacbe65f593a24cf5a12026c2 (patch)
tree7b86cb289b91424ccfc6ba1b23c13b3aaa904555 /editor
parent9d64a2e97b75251bf1cf320872e6dcad6956e0d3 (diff)
parent5d7a9f8a5ce06a78b738746b771a652cf49e8982 (diff)
Merge pull request #67814 from opl-/fix/editor-inspector-accept-event
Fix editor inspector classes not accepting events
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_inspector.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 0457dc81ff..a5397a8e6a 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -660,6 +660,7 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
if (keying_rect.has_point(mpos)) {
+ accept_event();
emit_signal(SNAME("property_keyed"), property, use_keying_next());
if (use_keying_next()) {
@@ -683,10 +684,12 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
}
if (delete_rect.has_point(mpos)) {
+ accept_event();
emit_signal(SNAME("property_deleted"), property);
}
if (revert_rect.has_point(mpos)) {
+ accept_event();
bool is_valid_revert = false;
Variant revert_value = EditorPropertyRevert::get_property_revert_value(object, property, &is_valid_revert);
ERR_FAIL_COND(!is_valid_revert);
@@ -695,11 +698,13 @@ void EditorProperty::gui_input(const Ref<InputEvent> &p_event) {
}
if (check_rect.has_point(mpos)) {
+ accept_event();
checked = !checked;
queue_redraw();
emit_signal(SNAME("property_checked"), property, checked);
}
} else if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::RIGHT) {
+ accept_event();
_update_popup();
menu->set_position(get_screen_position() + get_local_mouse_position());
menu->reset_size();
@@ -1482,6 +1487,8 @@ void EditorInspectorSection::gui_input(const Ref<InputEvent> &p_event) {
return;
}
+ accept_event();
+
bool should_unfold = !object->editor_is_section_unfolded(section);
if (should_unfold) {
unfold();
@@ -1680,6 +1687,7 @@ void EditorInspectorArray::_panel_gui_input(Ref<InputEvent> p_event, int p_index
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid()) {
if (movable && mb->get_button_index() == MouseButton::RIGHT) {
+ array_elements[p_index].panel->accept_event();
popup_array_index_pressed = begin_array_index + p_index;
rmb_popup->set_item_disabled(OPTION_MOVE_UP, popup_array_index_pressed == 0);
rmb_popup->set_item_disabled(OPTION_MOVE_DOWN, popup_array_index_pressed == count - 1);