Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update signal connections error dialog #28104

Merged
merged 1 commit into from Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions editor/connections_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ Signal automatically called by parent dialog.
void ConnectDialog::ok_pressed() {

if (dst_method->get_text() == "") {
error->set_text(TTR("Method in target Node must be specified!"));
error->set_text(TTR("Method in target node must be specified."));
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->set_text(TTR("Target method not found. Specify a valid method or attach a script to the target node."));
error->popup_centered_minsize();
return;
}
Expand Down Expand Up @@ -440,8 +440,9 @@ ConnectDialog::ConnectDialog() {

cdbinds = memnew(ConnectDialogBinds);

error = memnew(ConfirmationDialog);
error = memnew(AcceptDialog);
add_child(error);
error->set_title(TTR("Cannot connect signal"));
error->get_ok()->set_text(TTR("Close"));
get_ok()->set_text(TTR("Connect"));
}
Expand Down
2 changes: 1 addition & 1 deletion editor/connections_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ConnectDialog : public ConfirmationDialog {
VBoxContainer *vbc_right;

SceneTreeEditor *tree;
ConfirmationDialog *error;
AcceptDialog *error;
EditorInspector *bind_editor;
OptionButton *type_list;
CheckButton *deferred;
Expand Down