Explorar el Código

Fix EditorProperty shortcuts being global and unintentionally triggering

Eric M hace 5 meses
padre
commit
e539b62aa7
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. 6 0
      editor/editor_inspector.cpp

+ 6 - 0
editor/editor_inspector.cpp

@@ -579,6 +579,12 @@ void EditorProperty::_notification(int p_what) {
 			}
 		} break;
 		case NOTIFICATION_ENTER_TREE: {
+			EditorInspector *inspector = get_parent_inspector();
+			if (inspector) {
+				inspector = inspector->get_root_inspector();
+			}
+			set_shortcut_context(inspector);
+
 			if (has_borders) {
 				get_parent()->connect(SceneStringName(theme_changed), callable_mp(this, &EditorProperty::_update_property_bg));
 				_update_property_bg();