Improve appearance of [connection] and [editable] sections in .tscn files
(cherry picked from commit 02c0edac60
)
This commit is contained in:
parent
f7ed1f4d1f
commit
ebb5821bce
1 changed files with 7 additions and 1 deletions
|
@ -1741,6 +1741,9 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < state->get_connection_count(); i++) {
|
for (int i = 0; i < state->get_connection_count(); i++) {
|
||||||
|
if (i == 0) {
|
||||||
|
f->store_line("");
|
||||||
|
}
|
||||||
|
|
||||||
String connstr = "[connection";
|
String connstr = "[connection";
|
||||||
connstr += " signal=\"" + String(state->get_connection_signal(i)) + "\"";
|
connstr += " signal=\"" + String(state->get_connection_signal(i)) + "\"";
|
||||||
|
@ -1765,7 +1768,10 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
|
||||||
|
|
||||||
Vector<NodePath> editable_instances = state->get_editable_instances();
|
Vector<NodePath> editable_instances = state->get_editable_instances();
|
||||||
for (int i = 0; i < editable_instances.size(); i++) {
|
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() + "\"]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue