|
@@ -1637,7 +1637,7 @@ void VisualScriptEditor::_on_nodes_duplicate() {
|
|
|
|
|
|
for (Set<int>::Element *F = to_duplicate.front(); F; F = F->next()) {
|
|
for (Set<int>::Element *F = to_duplicate.front(); F; F = F->next()) {
|
|
|
|
|
|
- // duplicate from the specifc function but place it into the default func as it would lack the connections
|
|
|
|
|
|
+ // duplicate from the specific function but place it into the default func as it would lack the connections
|
|
StringName func = _get_function_of_node(F->get());
|
|
StringName func = _get_function_of_node(F->get());
|
|
Ref<VisualScriptNode> node = script->get_node(func, F->get());
|
|
Ref<VisualScriptNode> node = script->get_node(func, F->get());
|
|
|
|
|
|
@@ -2938,7 +2938,7 @@ void VisualScriptEditor::_graph_connected(const String &p_from, int p_from_slot,
|
|
if ((to_node_pos.x - from_node_pos.x) < 0) {
|
|
if ((to_node_pos.x - from_node_pos.x) < 0) {
|
|
// to is behind from node
|
|
// to is behind from node
|
|
if (to_node_pos.x > (from_node_pos.x - to_node_size.x - 240))
|
|
if (to_node_pos.x > (from_node_pos.x - to_node_size.x - 240))
|
|
- new_to_node_pos.x = from_node_pos.x - to_node_size.x - 240; // approx size of construtor node + padding
|
|
|
|
|
|
+ new_to_node_pos.x = from_node_pos.x - to_node_size.x - 240; // approx size of constructor node + padding
|
|
else
|
|
else
|
|
new_to_node_pos.x = to_node_pos.x;
|
|
new_to_node_pos.x = to_node_pos.x;
|
|
new_to_node_pos.y = to_node_pos.y;
|
|
new_to_node_pos.y = to_node_pos.y;
|
|
@@ -2947,7 +2947,7 @@ void VisualScriptEditor::_graph_connected(const String &p_from, int p_from_slot,
|
|
} else {
|
|
} else {
|
|
// to is ahead of from node
|
|
// to is ahead of from node
|
|
if (to_node_pos.x < (from_node_size.x + from_node_pos.x + 240))
|
|
if (to_node_pos.x < (from_node_size.x + from_node_pos.x + 240))
|
|
- new_to_node_pos.x = from_node_size.x + from_node_pos.x + 240; // approx size of construtor node + padding
|
|
|
|
|
|
+ new_to_node_pos.x = from_node_size.x + from_node_pos.x + 240; // approx size of constructor node + padding
|
|
else
|
|
else
|
|
new_to_node_pos.x = to_node_pos.x;
|
|
new_to_node_pos.x = to_node_pos.x;
|
|
new_to_node_pos.y = to_node_pos.y;
|
|
new_to_node_pos.y = to_node_pos.y;
|