浏览代码

Fix small drawing error in TileSet editor

Michael Alexsander Silva Dias 6 年之前
父节点
当前提交
daf54133c2
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      editor/plugins/tile_set_editor_plugin.cpp

+ 3 - 0
editor/plugins/tile_set_editor_plugin.cpp

@@ -874,6 +874,9 @@ void TileSetEditor::_on_workspace_draw() {
 			draw_edited_region_subdivision();
 		} else {
 			int t_id = get_current_tile();
+			if (t_id < 0)
+				return;
+
 			Rect2i region;
 			if (draw_edited_region)
 				region = edited_region;