mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 19:11:33 +00:00
fix not beeing able to open empty scripts
This commit is contained in:
parent
4f39ce32b9
commit
296941f745
1 changed files with 1 additions and 5 deletions
|
|
@ -1557,13 +1557,9 @@ ScriptTextEditor::ScriptTextEditor() {
|
||||||
|
|
||||||
static ScriptEditorBase *create_editor(const Ref<Script> &p_script) {
|
static ScriptEditorBase *create_editor(const Ref<Script> &p_script) {
|
||||||
|
|
||||||
if (p_script->has_source_code()) {
|
|
||||||
return memnew(ScriptTextEditor);
|
return memnew(ScriptTextEditor);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScriptTextEditor::register_editor() {
|
void ScriptTextEditor::register_editor() {
|
||||||
|
|
||||||
ED_SHORTCUT("script_text_editor/undo", TTR("Undo"), KEY_MASK_CMD | KEY_Z);
|
ED_SHORTCUT("script_text_editor/undo", TTR("Undo"), KEY_MASK_CMD | KEY_Z);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue