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 20, 2024
1 parent 696d8a2 commit f94c2f6
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);

Check failure on line 61 in editor/plugins/polygon_2d_editor_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🐧 Linux / Editor w/ Mono (target=editor)

unused variable 'draw' [-Werror=unused-variable]

Check failure on line 61 in editor/plugins/polygon_2d_editor_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🐧 Linux / Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold)

unused variable 'draw' [-Werror=unused-variable]

Check failure on line 61 in editor/plugins/polygon_2d_editor_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🐧 Linux / Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)

unused variable 'draw' [-Werror,-Wunused-variable]

Check failure on line 61 in editor/plugins/polygon_2d_editor_plugin.cpp

View workflow job for this annotation

GitHub Actions / 🐧 Linux / Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)

unused variable 'draw' [-Werror,-Wunused-variable]
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 f94c2f6

Please sign in to comment.