Skip to content

Commit 5ba3c30

Browse files
committed
Script Window: Use popup_dialog
This is better because it considers the editor single window mode.
1 parent 94a4d60 commit 5ba3c30

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

addons/block_code/block_code_plugin.gd

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ func _enter_tree():
6161
func script_window_requested(script: String):
6262
var script_window = ScriptWindow.instantiate()
6363
script_window.script_content = script
64-
65-
EditorInterface.get_base_control().add_child(script_window)
66-
64+
EditorInterface.popup_dialog(script_window)
6765
await script_window.close_requested
6866

6967
script_window.queue_free()

addons/block_code/ui/script_window/script_window.gd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var script_content: String = ""
77

88

99
func _ready():
10-
popup_centered()
1110
script_label.text = script_content.replace("\t", " ")
1211

1312

0 commit comments

Comments
 (0)