summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/resource_format_text.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index d4d8018d43..ba39593690 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -1763,6 +1763,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
}
for (int i = 0; i < state->get_connection_count(); i++) {
+ if (i == 0) {
+ f->store_line("");
+ }
+
String connstr = "[connection";
connstr += " signal=\"" + String(state->get_connection_signal(i)) + "\"";
connstr += " from=\"" + String(state->get_connection_source(i).simplified()) + "\"";
@@ -1786,7 +1790,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
Vector<NodePath> editable_instances = state->get_editable_instances();
for (int i = 0; i < editable_instances.size(); i++) {
- f->store_line("\n[editable path=\"" + editable_instances[i].operator String() + "\"]");
+ if (i == 0) {
+ f->store_line("");
+ }
+ f->store_line("[editable path=\"" + editable_instances[i].operator String() + "\"]");
}
}