Skip to content

Commit de84895

Browse files
committed
Only show the Block Code panel if a BlockCode node is selected
https://phabricator.endlessm.com/T35541
1 parent a3b6898 commit de84895

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

addons/block_code/block_code_plugin.gd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ func _on_editor_inspector_edited_object_changed():
115115
selected_block_code_node = null
116116

117117
BlockCodePlugin.main_panel.switch_block_code_node(selected_block_code_node)
118-
if selected_block_code_node:
118+
if edited_node is BlockCode:
119+
# If the user explicitly chose a BlockCode node, show the Block Code
120+
# editor. We only do this for the BlockCode node itself, rather than
121+
# nodes containing BlockCode, to avoid conflicts with other panels.
119122
make_bottom_panel_item_visible(main_panel)
120123

121124

0 commit comments

Comments
 (0)