From bef8e4b9d6a503e3b56334080a336373cb85591c Mon Sep 17 00:00:00 2001 From: MihailRis Date: Wed, 13 Aug 2025 23:42:06 +0300 Subject: [PATCH] feat: model autorefresh in editor --- res/layouts/code_editor.xml.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/res/layouts/code_editor.xml.lua b/res/layouts/code_editor.xml.lua index 66a70ed8..0f9a02e8 100644 --- a/res/layouts/code_editor.xml.lua +++ b/res/layouts/code_editor.xml.lua @@ -81,6 +81,11 @@ local function refresh_file_title() document.saveIcon.enabled = edited document.title.text = gui.str('File')..' - '..current_file.filename ..(edited and ' *' or '') + + local info = registry.get_info(current_file.filename) + if info and info.type == "model" then + pcall(run_current_file) + end end function on_control_combination(keycode)