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
@ -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(base_control, "queue_redraw");
|
||||||
undo_redo->add_do_method(this, "emit_signal", "polygons_changed");
|
undo_redo->add_do_method(this, "emit_signal", "polygons_changed");
|
||||||
for (const PackedVector2Array &polygon : polygons) {
|
for (unsigned int i = 0; i < polygons.size(); i++) {
|
||||||
undo_redo->add_undo_method(this, "set_polygon", polygon);
|
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(base_control, "queue_redraw");
|
||||||
undo_redo->add_undo_method(this, "emit_signal", "polygons_changed");
|
undo_redo->add_undo_method(this, "emit_signal", "polygons_changed");
|
||||||
|
Loading…
Reference in New Issue
Block a user