diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-09-04 16:54:05 -0300 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-09-04 16:54:05 -0300 |
commit | fd0dace4b58480b1879ca08d05d001dda766062e (patch) | |
tree | e5f613d512e75630a97dc513b14531ebf735febb /editor | |
parent | b25b1fb6008b32810af56e7033d915fa9f3ca677 (diff) |
Small fixes for the Tile/GridMap editors
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 26fae96025..fb3fd93f97 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -986,7 +986,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) { if (mb->is_pressed()) { if (Input::get_singleton()->is_key_pressed(KEY_SPACE)) - return false; //drag + return false; // Drag. if (tool == TOOL_NONE) { @@ -1590,7 +1590,7 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) { } } - int max_lines = 10000; //avoid crash if size too smal + int max_lines = 10000; //avoid crash if size too small if (node->get_half_offset() != TileMap::HALF_OFFSET_Y && node->get_half_offset() != TileMap::HALF_OFFSET_NEGATIVE_Y) { @@ -1642,7 +1642,7 @@ void TileMapEditor::forward_canvas_draw_over_viewport(Control *p_overlay) { p_overlay->draw_colored_polygon(points, Color(0.2, 0.8, 1, 0.4)); } - if (mouse_over) { + if (mouse_over && node->get_tileset().is_valid()) { Vector2 endpoints[4] = { node->map_to_world(over_tile, true), |