소스 검색

Fix method not returning value in all paths (autotile editor)

George Marques 7 년 전
부모
커밋
c8d416d152
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      editor/plugins/tile_set_editor_plugin.cpp

+ 3 - 3
editor/plugins/tile_set_editor_plugin.cpp

@@ -1435,13 +1435,13 @@ bool AutotileEditorHelper::_get(const StringName &p_name, Variant &r_ret) const
 		return false;
 
 	String name = p_name.operator String();
+	bool v = false;
 	if (name == "bitmask_mode") {
-		r_ret = tile_set->get(String::num(autotile_editor->get_current_tile(), 0) + "/autotile/bitmask_mode");
+		r_ret = tile_set->get(String::num(autotile_editor->get_current_tile(), 0) + "/autotile/bitmask_mode", &v);
 	} else if (name.left(7) == "layout/") {
-		bool v;
 		r_ret = tile_set->get(String::num(autotile_editor->get_current_tile(), 0) + "/autotile" + name.right(6), &v);
-		return v;
 	}
+	return v;
 }
 
 void AutotileEditorHelper::_get_property_list(List<PropertyInfo> *p_list) const {