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
fc2550c4
Unverified
Commit
fc2550c4
authored
Jan 16, 2020
by
Rémi Verschelde
Committed by
GitHub
Jan 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #35123 from asynts/asynts.crash-on-double-click
Prevent crash described in #34555.
parents
61350375
71b4b180
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
connections_dialog.cpp
editor/connections_dialog.cpp
+12
-1
connections_dialog.h
editor/connections_dialog.h
+1
-0
No files found.
editor/connections_dialog.cpp
View file @
fc2550c4
...
...
@@ -150,6 +150,16 @@ void ConnectDialog::_tree_node_selected() {
}
/*
* Called each time a target node is activated within the target node tree.
*/
void
ConnectDialog
::
_tree_item_activated
()
{
if
(
!
get_ok
()
->
is_disabled
())
{
get_ok
()
->
emit_signal
(
"pressed"
);
}
}
/*
* Adds a new parameter bind to connection.
*/
void
ConnectDialog
::
_add_bind
()
{
...
...
@@ -212,6 +222,7 @@ void ConnectDialog::_bind_methods() {
ClassDB
::
bind_method
(
"_advanced_pressed"
,
&
ConnectDialog
::
_advanced_pressed
);
ClassDB
::
bind_method
(
"_cancel"
,
&
ConnectDialog
::
_cancel_pressed
);
ClassDB
::
bind_method
(
"_tree_node_selected"
,
&
ConnectDialog
::
_tree_node_selected
);
ClassDB
::
bind_method
(
"_tree_item_activated"
,
&
ConnectDialog
::
_tree_item_activated
);
ClassDB
::
bind_method
(
"_add_bind"
,
&
ConnectDialog
::
_add_bind
);
ClassDB
::
bind_method
(
"_remove_bind"
,
&
ConnectDialog
::
_remove_bind
);
...
...
@@ -363,7 +374,7 @@ ConnectDialog::ConnectDialog() {
tree
=
memnew
(
SceneTreeEditor
(
false
));
tree
->
set_connecting_signal
(
true
);
tree
->
get_scene_tree
()
->
connect
(
"item_activated"
,
this
,
"_
ok
"
);
tree
->
get_scene_tree
()
->
connect
(
"item_activated"
,
this
,
"_
tree_item_activated
"
);
tree
->
connect
(
"node_selected"
,
this
,
"_tree_node_selected"
);
tree
->
set_connect_to_script_mode
(
true
);
...
...
editor/connections_dialog.h
View file @
fc2550c4
...
...
@@ -76,6 +76,7 @@ class ConnectDialog : public ConfirmationDialog {
void
ok_pressed
();
void
_cancel_pressed
();
void
_tree_node_selected
();
void
_tree_item_activated
();
void
_add_bind
();
void
_remove_bind
();
void
_advanced_pressed
();
...
...
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