diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-03-16 11:12:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-16 11:12:35 -0700 |
commit | 39a5bb4fbc9977fe0ee88c547d997c3acc9650cb (patch) | |
tree | dfbd006e876e417958791651a4d51993382d39e8 /scene | |
parent | c1fae20400df7be9c8fd31b10b0f7a7f8c0001f3 (diff) | |
parent | 9bbda4db2f946e1efc4b9a1bb8eef591dc70fc15 (diff) |
Merge pull request #26459 from ptrojahn/eof
Remove extraneous line breaks from text resources
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/resource_format_text.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 210fbe9f20..b6efca9acc 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -1645,7 +1645,8 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r } } - f->store_string("\n"); + if (E->next()) + f->store_line(String()); } if (packed_scene.is_valid()) { @@ -1714,7 +1715,8 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r f->store_string(_valprop(String(state->get_node_property_name(i, j))) + " = " + vars + "\n"); } - f->store_line(String()); + if (i < state->get_node_count() - 1) + f->store_line(String()); } for (int i = 0; i < state->get_connection_count(); i++) { |