summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-07-26 11:24:34 +0200
committerkobewi <kobewi4e@gmail.com>2021-07-26 11:24:34 +0200
commitbba76e45ff6f69053baf5d149a54ae956241fcc3 (patch)
tree0331dd10ce3715aebcea838b31d0085ac39d5303 /editor
parent438be4422f25ccc93aa47cd8ed9a01ff318949c7 (diff)
Fix undo for bucket tool in tile map
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/tiles/tile_map_editor.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/editor/plugins/tiles/tile_map_editor.cpp b/editor/plugins/tiles/tile_map_editor.cpp
index 44822bec3a..4a4e81dae3 100644
--- a/editor/plugins/tiles/tile_map_editor.cpp
+++ b/editor/plugins/tiles/tile_map_editor.cpp
@@ -1210,9 +1210,6 @@ void TileMapEditorTilesPlugin::_stop_dragging() {
case DRAG_TYPE_BUCKET: {
undo_redo->create_action(TTR("Paint tiles"));
for (Map<Vector2i, TileMapCell>::Element *E = drag_modified.front(); E; E = E->next()) {
- if (!erase_button->is_pressed() && E->get().source_id == TileSet::INVALID_SOURCE) {
- continue;
- }
undo_redo->add_do_method(tile_map, "set_cell", E->key(), tile_map->get_cell_source_id(E->key()), tile_map->get_cell_atlas_coords(E->key()), tile_map->get_cell_alternative_tile(E->key()));
undo_redo->add_undo_method(tile_map, "set_cell", E->key(), E->get().source_id, E->get().get_atlas_coords(), E->get().alternative_tile);
}