Răsfoiți Sursa

Fix EditorPropertyResource focus outline being drawn behind the preview

Hugo Locurcio 4 ani în urmă
părinte
comite
0b47f1be8c
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      editor/editor_properties.cpp

+ 2 - 0
editor/editor_properties.cpp

@@ -3254,6 +3254,8 @@ EditorPropertyResource::EditorPropertyResource() {
 	preview->set_offset(SIDE_TOP, 1);
 	preview->set_offset(SIDE_TOP, 1);
 	preview->set_offset(SIDE_BOTTOM, -1);
 	preview->set_offset(SIDE_BOTTOM, -1);
 	preview->set_offset(SIDE_RIGHT, -1);
 	preview->set_offset(SIDE_RIGHT, -1);
+	// This is required to draw the focus outline in front of the preview, rather than behind.
+	preview->set_draw_behind_parent(true);
 	assign->add_child(preview);
 	assign->add_child(preview);
 	assign->connect("gui_input", callable_mp(this, &EditorPropertyResource::_button_input));
 	assign->connect("gui_input", callable_mp(this, &EditorPropertyResource::_button_input));