summaryrefslogtreecommitdiff
path: root/editor/plugins/tiles
diff options
context:
space:
mode:
authorLightning_A <aaronjrecord@gmail.com>2021-07-03 16:17:03 -0600
committerAaron Record <aaronjrecord@gmail.com>2021-11-23 18:58:57 -0700
commite078f970db0e72bcc665d714416e6fc74e8434a6 (patch)
tree21fb39b40de2674a99018d88e142e6f0196c68b0 /editor/plugins/tiles
parent5efe80f3085c8c6451363fe4c743bf3d7fc20b6c (diff)
Rename `remove()` to `remove_at()` when removing by index
Diffstat (limited to 'editor/plugins/tiles')
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index d165f44334..44cf6b42bc 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -516,7 +516,7 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event)
_grab_polygon_point(mb->get_position(), xform, closest_polygon, closest_point);
if (closest_polygon >= 0) {
PackedVector2Array old_polygon = polygons[closest_polygon];
- polygons[closest_polygon].remove(closest_point);
+ polygons[closest_polygon].remove_at(closest_point);
undo_redo->create_action(TTR("Edit Polygons"));
if (polygons[closest_polygon].size() < 3) {
remove_polygon(closest_polygon);
@@ -563,7 +563,7 @@ void GenericTilePolygonEditor::_base_control_gui_input(Ref<InputEvent> p_event)
_grab_polygon_point(mb->get_position(), xform, closest_polygon, closest_point);
if (closest_polygon >= 0) {
PackedVector2Array old_polygon = polygons[closest_polygon];
- polygons[closest_polygon].remove(closest_point);
+ polygons[closest_polygon].remove_at(closest_point);
undo_redo->create_action(TTR("Edit Polygons"));
if (polygons[closest_polygon].size() < 3) {
remove_polygon(closest_polygon);
@@ -676,7 +676,7 @@ int GenericTilePolygonEditor::add_polygon(Vector<Point2> p_polygon, int p_index)
void GenericTilePolygonEditor::remove_polygon(int p_index) {
ERR_FAIL_INDEX(p_index, (int)polygons.size());
- polygons.remove(p_index);
+ polygons.remove_at(p_index);
if (polygons.size() == 0) {
button_create->set_pressed(true);