浏览代码

Fix tilemap undo/redo

Marc Gilleron 7 年之前
父节点
当前提交
0b7ae364ea
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      editor/plugins/tile_map_editor_plugin.cpp

+ 2 - 2
editor/plugins/tile_map_editor_plugin.cpp

@@ -973,7 +973,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
 
 				Point2i pos = points[i];
 
-				if (!paint_undo.has(over_tile)) {
+				if (!paint_undo.has(pos)) {
 					paint_undo[pos] = _get_op_from_cell(pos);
 				}
 
@@ -993,7 +993,7 @@ bool TileMapEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
 
 				Point2i pos = points[i];
 
-				if (!paint_undo.has(over_tile)) {
+				if (!paint_undo.has(pos)) {
 					paint_undo[pos] = _get_op_from_cell(pos);
 				}