Fixes undo/redo in tileset polygon editor
This commit is contained in:
parent
42425baa59
commit
8b608f3e6e
1 changed files with 2 additions and 2 deletions
|
@ -361,8 +361,8 @@ void GenericTilePolygonEditor::_advanced_menu_item_pressed(int p_item_pressed) {
|
|||
}
|
||||
undo_redo->add_do_method(base_control, "queue_redraw");
|
||||
undo_redo->add_do_method(this, "emit_signal", "polygons_changed");
|
||||
for (const PackedVector2Array &polygon : polygons) {
|
||||
undo_redo->add_undo_method(this, "set_polygon", polygon);
|
||||
for (unsigned int i = 0; i < polygons.size(); i++) {
|
||||
undo_redo->add_undo_method(this, "set_polygon", i, polygons[i]);
|
||||
}
|
||||
undo_redo->add_undo_method(base_control, "queue_redraw");
|
||||
undo_redo->add_undo_method(this, "emit_signal", "polygons_changed");
|
||||
|
|
Loading…
Reference in a new issue