diff --git a/modules/material_maker/editor/widgets/polygon_edit/polygon_control_point.cpp b/modules/material_maker/editor/widgets/polygon_edit/polygon_control_point.cpp index c0715b046..3d230c6d5 100644 --- a/modules/material_maker/editor/widgets/polygon_edit/polygon_control_point.cpp +++ b/modules/material_maker/editor/widgets/polygon_edit/polygon_control_point.cpp @@ -57,6 +57,9 @@ PolygonControlPoint::~PolygonControlPoint() { void PolygonControlPoint::_notification(int p_what) { switch (p_what) { + case NOTIFICATION_POSTINITIALIZE: { + connect("gui_input", this, "_on_ControlPoint_gui_input"); + } break; case NOTIFICATION_DRAW: { _draw(); } break; diff --git a/modules/material_maker/editor/widgets/polygon_edit/polygon_editor.cpp b/modules/material_maker/editor/widgets/polygon_edit/polygon_editor.cpp index 92f793394..ba1bfe164 100644 --- a/modules/material_maker/editor/widgets/polygon_edit/polygon_editor.cpp +++ b/modules/material_maker/editor/widgets/polygon_edit/polygon_editor.cpp @@ -42,9 +42,7 @@ void PolygonEditor::_on_ControlPoint_moved(const int index) { PolygonControlPoint *control_point = Object::cast_to(get_child(index)); PoolVector2Array points = polygon->get_points(); - points.set(index, reverse_transform_point(control_point->get_position() + control_point->OFFSET)); - polygon->set_points(points); update();