From 04c749a1f034c0b2256fdca0ca2675f696b490e8 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 13 Jan 2017 10:45:50 -0300 Subject: New API for visibility in both CanvasItem and Spatial visible (property) - access set_visible(bool) is_visible() is_visible_in_tree() - true when visible and parents visible show() hide() - for convenience --- tools/editor/plugins/tile_map_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/editor/plugins/tile_map_editor_plugin.cpp') diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp index 2c64f7cd8..1a8c35a0b 100644 --- a/tools/editor/plugins/tile_map_editor_plugin.cpp +++ b/tools/editor/plugins/tile_map_editor_plugin.cpp @@ -53,7 +53,7 @@ void TileMapEditor::_notification(int p_what) { } break; case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: { - if (is_visible()) { + if (is_visible_in_tree()) { _update_palette(); } } break; @@ -597,7 +597,7 @@ static inline Vector line(int x0, int x1, int y0, int y1) { bool TileMapEditor::forward_gui_input(const InputEvent& p_event) { - if (!node || !node->get_tileset().is_valid() || !node->is_visible()) + if (!node || !node->get_tileset().is_valid() || !node->is_visible_in_tree()) return false; Transform2D xform = CanvasItemEditor::get_singleton()->get_canvas_transform() * node->get_global_transform(); -- cgit v1.2.3-70-g09d2