Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
79f46da1
Commit
79f46da1
authored
Jun 19, 2020
by
Dominik 'dreamsComeTrue' Jasiński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent having spaces in signal's method in Connect Dialog
Fixes: #39647
parent
4e0f31a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
connections_dialog.cpp
editor/connections_dialog.cpp
+11
-2
No files found.
editor/connections_dialog.cpp
View file @
79f46da1
...
...
@@ -108,17 +108,26 @@ public:
* Signal automatically called by parent dialog.
*/
void
ConnectDialog
::
ok_pressed
()
{
if
(
dst_method
->
get_text
()
==
""
)
{
String
method_name
=
dst_method
->
get_text
();
if
(
method_name
==
""
)
{
error
->
set_text
(
TTR
(
"Method in target node must be specified."
));
error
->
popup_centered
();
return
;
}
if
(
!
method_name
.
strip_edges
().
is_valid_identifier
())
{
error
->
set_text
(
TTR
(
"Method name must be a valid identifier."
));
error
->
popup_centered
();
return
;
}
Node
*
target
=
tree
->
get_selected
();
if
(
!
target
)
{
return
;
// Nothing selected in the tree, not an error.
}
if
(
target
->
get_script
().
is_null
())
{
if
(
!
target
->
has_method
(
dst_method
->
get_text
()
))
{
if
(
!
target
->
has_method
(
method_name
))
{
error
->
set_text
(
TTR
(
"Target method not found. Specify a valid method or attach a script to the target node."
));
error
->
popup_centered
();
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment