소스 검색

Merge pull request #30148 from zaksnet/fix-texture-editor

Adds automatic update for StyleBoxTexture > region_rect
Rémi Verschelde 5 년 전
부모
커밋
74dbcf1e4d
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      editor/plugins/texture_region_editor_plugin.cpp
  2. 1 0
      scene/resources/style_box.cpp

+ 1 - 1
editor/plugins/texture_region_editor_plugin.cpp

@@ -875,7 +875,7 @@ void TextureRegionEditor::_changed_callback(Object *p_changed, const char *p_pro
 	if (!is_visible()) {
 		return;
 	}
-	if (p_prop == StringName("atlas") || p_prop == StringName("texture")) {
+	if (p_prop == StringName("atlas") || p_prop == StringName("texture") || p_prop == StringName("region")) {
 		_edit_region();
 	}
 }

+ 1 - 0
scene/resources/style_box.cpp

@@ -245,6 +245,7 @@ void StyleBoxTexture::set_region_rect(const Rect2 &p_region_rect) {
 
 	region_rect = p_region_rect;
 	emit_changed();
+	_change_notify("region");
 }
 
 Rect2 StyleBoxTexture::get_region_rect() const {