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)