Merge pull request #83093 from groud/fix_polygon_editor_undo_redo
Fixes undo/redo in tileset polygon editor
This commit is contained in:
commit
d80ce0c52a
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