diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-18 22:00:31 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-18 22:00:31 -0300 |
commit | 0f7a86ca523f7939a0f079e07f9245dd773d35bd (patch) | |
tree | 5a48ba232596ee885b5bb86439b6fc124de4e9fc /scene/gui | |
parent | dc33d25fecab418030903258ba58d93bdae88d66 (diff) |
If using relationship lines (now default) hide guides.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/tree.cpp | 5 | ||||
-rw-r--r-- | scene/gui/tree.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 31f7a21114..c083e727d1 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -901,6 +901,7 @@ void Tree::update_cache() { cache.item_margin = get_constant("item_margin"); cache.button_margin = get_constant("button_margin"); cache.guide_width = get_constant("guide_width"); + cache.draw_guides = get_constant("draw_guides"); cache.draw_relationship_lines = get_constant("draw_relationship_lines"); cache.relationship_line_color = get_color("relationship_line_color"); cache.scroll_border = get_constant("scroll_border"); @@ -1132,7 +1133,9 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2 cell_rect.size.x += cache.hseparation; } - VisualServer::get_singleton()->canvas_item_add_line(ci, Point2i(cell_rect.position.x, cell_rect.position.y + cell_rect.size.height), cell_rect.position + cell_rect.size, cache.guide_color, 1); + if (cache.draw_guides) { + VisualServer::get_singleton()->canvas_item_add_line(ci, Point2i(cell_rect.position.x, cell_rect.position.y + cell_rect.size.height), cell_rect.position + cell_rect.size, cache.guide_color, 1); + } if (i == 0) { diff --git a/scene/gui/tree.h b/scene/gui/tree.h index 34138acb85..886ce66e2c 100644 --- a/scene/gui/tree.h +++ b/scene/gui/tree.h @@ -434,6 +434,7 @@ private: int button_margin; Point2 offset; int draw_relationship_lines; + int draw_guides; int scroll_border; int scroll_speed; |