diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-09-24 11:06:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-24 11:06:34 +0200 |
commit | cf540f853dd0a4fd4bb20d3396c275f72b28a7c8 (patch) | |
tree | fa62f5092ead5e5cc008970dd74fd336a80f8737 /editor | |
parent | 0bcc2c2f5f4607df835eccd96095cf6e2ea203dc (diff) | |
parent | fd0dace4b58480b1879ca08d05d001dda766062e (diff) |
Merge pull request #31974 from YeldhamDev/tilegrid_map_fixes
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 90276041a8..86d538e702 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -989,7 +989,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) { @@ -1593,7 +1593,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) { @@ -1645,7 +1645,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), |