Merge pull request #116970 from ryevdokimov/path3d-signal-fix
Fix duplicate signal error for `Path3D` when switching tabs
This commit is contained in:
commit
8130dde509
1 changed files with 9 additions and 1 deletions
|
|
@ -579,7 +579,6 @@ Path3DGizmo::Path3DGizmo(Path3D *p_path) {
|
|||
|
||||
// Connecting to a signal once, rather than plaguing the implementation with calls to `Node3DEditor::update_transform_gizmo`.
|
||||
path->connect("curve_changed", callable_mp(this, &Path3DGizmo::_update_transform_gizmo));
|
||||
path->connect("curve_changed", callable_mp(Path3DEditorPlugin::singleton, &Path3DEditorPlugin::_update_toolbar));
|
||||
path->connect("debug_color_changed", callable_mp(this, &Path3DGizmo::redraw));
|
||||
|
||||
Path3DEditorPlugin::singleton->curve_edit->connect(SceneStringName(pressed), callable_mp(this, &Path3DGizmo::redraw));
|
||||
|
|
@ -780,7 +779,16 @@ void Path3DEditorPlugin::update_handles() {
|
|||
}
|
||||
|
||||
void Path3DEditorPlugin::edit(Object *p_object) {
|
||||
if (path) {
|
||||
path->disconnect("curve_changed", callable_mp(this, &Path3DEditorPlugin::_update_toolbar));
|
||||
}
|
||||
|
||||
path = Object::cast_to<Path3D>(p_object);
|
||||
|
||||
if (path) {
|
||||
path->connect("curve_changed", callable_mp(this, &Path3DEditorPlugin::_update_toolbar));
|
||||
}
|
||||
|
||||
_update_toolbar();
|
||||
update_overlays();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue