Update hierarchy pane when renaming a group

This commit is contained in:
RodZill4 2020-03-12 07:51:01 +01:00
parent 7150ac082e
commit 22bacb6673
3 changed files with 8 additions and 2 deletions

View File

@ -42,6 +42,10 @@ func get_type() -> String:
func get_type_name() -> String:
return label
func set_type_name(l) -> void:
if l !=label:
label = l
emit_hierarchy_changed()
func toggle_editable() -> bool:
editable = !editable

View File

@ -352,7 +352,7 @@ func on_ButtonUp_pressed() -> void:
call_deferred("update_view", generator.get_parent())
func _on_Label_text_changed(new_text) -> void:
generator.label = new_text
generator.set_type_name(new_text)
# Create subgraph

View File

@ -54,7 +54,9 @@ func _on_Rotate_toggled(button_pressed) -> void:
$MaterialPreview/Preview3d/ObjectRotate.stop(false)
func get_materials() -> Array:
return [ current_object.get_surface_material(0) ]
if current_object != null:
return [ current_object.get_surface_material(0) ]
return []
func on_gui_input(event) -> void:
if event is InputEventMouseButton: