Skip to content

Commit 6847f1a

Browse files
authored
Merge pull request #147 from AnidemDex/make-sure-editor-works-in-runtime
Update CommandRecord registration.
2 parents 3ad3a19 + df5b9c8 commit 6847f1a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

core/plugin_script.gd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ func _init() -> void:
150150

151151
debugger = BlockflowDebugger.new()
152152

153+
command_record = Blockflow.CommandRecord.get_record()
154+
project_settings_changed.connect(command_record.reload_from_project_settings)
155+
153156
# Add the plugin to the list when we're created as soon as possible.
154157
# Existing doesn't mean that plugin is ready, be careful with that.
155158
Engine.set_meta(Constants.PLUGIN_NAME, self)
156-
157-
command_record = Blockflow.CommandRecord.new()
158-
project_settings_changed.connect(command_record.reload_from_project_settings)

editor/editor.gd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ var collection_displayer:CollectionDisplayer
6363
var command_list:CommandList
6464
var title_label:Label
6565
var template_generator:TemplateGenerator
66+
var command_record:Blockflow.CommandRecord
6667

6768
var edit_callback:Callable
6869
var toast_callback:Callable
@@ -917,4 +918,6 @@ func _init() -> void:
917918
_file_dialog.file_selected.connect(_editor_file_dialog_file_selected)
918919
add_child(_file_dialog)
919920

921+
command_record = Blockflow.CommandRecord.new()
922+
920923
Engine.set_meta("Blockflow_main_editor", self)

0 commit comments

Comments
 (0)