summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-11-18 21:52:01 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-11-18 21:52:01 -0300
commitdc33d25fecab418030903258ba58d93bdae88d66 (patch)
treed3bd68b17407e24c34b51528f9ad7232a3f80668 /editor
parentc12de11c4425aef128845932c0652f056295036e (diff)
Make sure inbetween lines in inspector can't be clicked, fixes #19014
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_inspector.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index d6f337cc20..a564a2a113 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1153,6 +1153,11 @@ void EditorInspectorSection::_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventMouseButton> mb = p_event;
if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
+ Ref<Font> font = get_font("font", "Tree");
+ if (mb->get_position().y > font->get_height()) { //clicked outside
+ return;
+ }
+
_test_unfold();
bool unfold = !object->editor_is_section_unfolded(section);