summaryrefslogtreecommitdiffstats
path: root/tools/editor/connections_dialog.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-10-30 09:00:45 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-10-30 09:00:45 -0300
commitab4126f51061277e87b41c48b40e7b54942d4eca (patch)
treec58168b60323c4d43b58743b099e562a89e60a56 /tools/editor/connections_dialog.cpp
parent8b15b26eedad4fdd33d50f5f9aa0fcc1875d503f (diff)
parent914015f3b63dd956e72ea937d46ea4b2db005ada (diff)
downloadredot-engine-ab4126f51061277e87b41c48b40e7b54942d4eca.tar.gz
Merge branch 'master' of https://github.com/godotengine/godot
Diffstat (limited to 'tools/editor/connections_dialog.cpp')
-rw-r--r--tools/editor/connections_dialog.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp
index c4f2435675..1baad2c6b3 100644
--- a/tools/editor/connections_dialog.cpp
+++ b/tools/editor/connections_dialog.cpp
@@ -181,6 +181,14 @@ void ConnectDialog::ok_pressed() {
error->popup_centered_minsize();
return;
}
+ Node* target = tree->get_selected();
+ if (target->get_script().is_null()) {
+ if (!target->has_method(dst_method->get_text())) {
+ error->set_text(TTR("Target method not found! Specify a valid method or attach a script to target Node."));
+ error->popup_centered_minsize();
+ return;
+ }
+ }
emit_signal("connected");
hide();