Skip to content

Commit

Permalink
Merge pull request #23138 from CakHuri/fix-disconect
Browse files Browse the repository at this point in the history
Repaired mistyped of 'just_disconnected'.
  • Loading branch information
akien-mga authored Oct 19, 2018
2 parents b902a2f + 596ba88 commit bde3e88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions scene/gui/graph_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
connecting_color = Object::cast_to<GraphNode>(to)->get_connection_input_color(E->get().to_port);
connecting_target = false;
connecting_to = pos;
just_disconected = true;
just_disconnected = true;

emit_signal("disconnection_request", E->get().from, E->get().from_port, E->get().to, E->get().to_port);
to = get_node(String(connecting_from)); //maybe it was erased
Expand All @@ -427,7 +427,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
connecting_color = gn->get_connection_output_color(j);
connecting_target = false;
connecting_to = pos;
just_disconected = false;
just_disconnected = false;
return;
}
}
Expand All @@ -453,7 +453,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
connecting_color = Object::cast_to<GraphNode>(fr)->get_connection_output_color(E->get().from_port);
connecting_target = false;
connecting_to = pos;
just_disconected = true;
just_disconnected = true;

emit_signal("disconnection_request", E->get().from, E->get().from_port, E->get().to, E->get().to_port);
fr = get_node(String(connecting_from)); //maybe it was erased
Expand All @@ -474,7 +474,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
connecting_color = gn->get_connection_input_color(j);
connecting_target = false;
connecting_to = pos;
just_disconected = true;
just_disconnected = true;

return;
}
Expand Down Expand Up @@ -544,7 +544,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {
}
emit_signal("connection_request", from, from_slot, to, to_slot);

} else if (!just_disconected) {
} else if (!just_disconnected) {
String from = connecting_from;
int from_slot = connecting_index;
Vector2 ofs = Vector2(mb->get_position().x, mb->get_position().y);
Expand Down Expand Up @@ -1368,6 +1368,6 @@ GraphEdit::GraphEdit() {
zoom_hb->add_child(snap_amount);

setting_scroll_ofs = false;
just_disconected = false;
just_disconnected = false;
set_clip_contents(true);
}
2 changes: 1 addition & 1 deletion scene/gui/graph_edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class GraphEdit : public Control {
Vector2 connecting_to;
String connecting_target_to;
int connecting_target_index;
bool just_disconected;
bool just_disconnected;

bool dragging;
bool just_selected;
Expand Down

0 comments on commit bde3e88

Please sign in to comment.