Skip to content

Commit

Permalink
Remove signal connections
Browse files Browse the repository at this point in the history
  • Loading branch information
aXu-AP committed Nov 21, 2024
1 parent 88b94ff commit a31dc61
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions editor/plugins/polygon_2d_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,12 @@ Node2D *Polygon2DEditor::_get_node() const {

void Polygon2DEditor::_set_node(Node *p_polygon) {
CanvasItem *draw = Object::cast_to<CanvasItem>(uv_edit_draw);
if (node) {
node->disconnect("draw", callable_mp(draw, &CanvasItem::queue_redraw));
node->disconnect("draw", callable_mp(this, &Polygon2DEditor::_update_available_modes));
}

node = Object::cast_to<Polygon2D>(p_polygon);
_update_polygon_editing_state();
uv_edit_draw->queue_redraw();
if (node) {
_menu_option(MODE_EDIT_UV);
// Whenever polygon gets redrawn, there's possible changes for the editor as well.
node->connect("draw", callable_mp(draw, &CanvasItem::queue_redraw));
node->connect("draw", callable_mp(this, &Polygon2DEditor::_update_available_modes));
}
}

Expand Down

0 comments on commit a31dc61

Please sign in to comment.