diff options
author | Poommetee Ketson <poommetee@protonmail.com> | 2017-09-17 11:55:01 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-17 11:55:01 +0700 |
commit | 2ca656fc38a7da6552b8d1bed88132062295748a (patch) | |
tree | 132bf506f75f2e4f2803f5330bd3a969baaa6933 /scene | |
parent | d8ca7d44059472344a7e14346feae8e478486d3c (diff) | |
parent | d84c79d349b20b0445b934d66266cf7c88928b09 (diff) |
Merge pull request #11350 from djrm/pr_compilation_fix
Fixed compilation with tools=no
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/text_edit.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index d9753de8b2..dc5e4d1010 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -29,7 +29,6 @@ /*************************************************************************/ #include "text_edit.h" -#include "editor/editor_scale.h" #include "message_queue.h" #include "os/input.h" #include "os/keyboard.h" @@ -37,6 +36,10 @@ #include "project_settings.h" #include "scene/main/viewport.h" +#ifdef TOOLS_ENABLED +#include "editor/editor_scale.h" +#endif + #define TAB_PIXELS static bool _is_text_char(CharType c) { @@ -735,7 +738,11 @@ void TextEdit::_notification(int p_what) { } if (text.is_breakpoint(line) && !draw_breakpoint_gutter) { +#ifdef TOOLS_ENABLED VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y + get_row_height() - EDSCALE, xmargin_end - xmargin_beg, EDSCALE), cache.breakpoint_color); +#else + VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(xmargin_beg, ofs_y, xmargin_end - xmargin_beg, get_row_height()), cache.breakpoint_color); +#endif } // draw breakpoint marker |