summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorjonyrock <ilms@live.ru>2014-05-01 01:58:26 +0400
committerjonyrock <ilms@live.ru>2014-05-01 01:58:26 +0400
commit34aea718b11e105d30c938ad34e474b1bd8b5d63 (patch)
tree04e1ddd2a73f345da748ff24d70410bf10b81bac /tools
parentbb853d121ef7dfeda510d9325ebd94a06a0e5ae2 (diff)
setted font bug fix
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/code_editor.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 3785792028..a780c0173e 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -511,21 +511,25 @@ void CodeTextEditor::set_error(const String& p_error) {
}
void CodeTextEditor::_on_settings_change() {
-
- String editor_font = EditorSettings::get_singleton()->get("text_editor/font");
+
+ // FONTS
+ String editor_font = EDITOR_DEF("text_editor/font", "");
+ bool font_overrode = false;
if (editor_font!="") {
Ref<Font> fnt = ResourceLoader::load(editor_font);
if (fnt.is_valid()) {
text_editor->add_font_override("font",fnt);
- return;
+ font_overrode = true;
}
}
-
- text_editor->add_font_override("font",get_font("source","Fonts"));
+ if(!font_overrode)
+ text_editor->add_font_override("font",get_font("source","Fonts"));
+ // AUTO BRACE COMPLETION
text_editor->set_auto_brace_completion(
EDITOR_DEF("text_editor/auto_brace_complete", false)
);
+
}
void CodeTextEditor::_text_changed_idle_timeout() {