From dfa336c427e53ec834b6f8a3ead6a765f6740ffc Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 13 Apr 2022 23:56:34 +0200 Subject: [PATCH] Fixed the uv previewer node. --- .../editor/uv_editor/mdr_ed_uv_previewer.cpp | 6 ++++++ .../editor/uv_editor/mdr_ed_uv_previewer.h | 1 + 2 files changed, 7 insertions(+) diff --git a/modules/mesh_data_resource/editor/uv_editor/mdr_ed_uv_previewer.cpp b/modules/mesh_data_resource/editor/uv_editor/mdr_ed_uv_previewer.cpp index 77c2ac175..c7be9407c 100644 --- a/modules/mesh_data_resource/editor/uv_editor/mdr_ed_uv_previewer.cpp +++ b/modules/mesh_data_resource/editor/uv_editor/mdr_ed_uv_previewer.cpp @@ -102,6 +102,12 @@ void MDREdUVPreviewer::_draw() { } } +void MDREdUVPreviewer::_notification(int p_what) { + if (p_what == NOTIFICATION_DRAW) { + _draw(); + } +} + MDREdUVPreviewer::MDREdUVPreviewer() { } diff --git a/modules/mesh_data_resource/editor/uv_editor/mdr_ed_uv_previewer.h b/modules/mesh_data_resource/editor/uv_editor/mdr_ed_uv_previewer.h index fc99da834..1337f0d06 100644 --- a/modules/mesh_data_resource/editor/uv_editor/mdr_ed_uv_previewer.h +++ b/modules/mesh_data_resource/editor/uv_editor/mdr_ed_uv_previewer.h @@ -44,6 +44,7 @@ public: ~MDREdUVPreviewer(); protected: + void _notification(int p_what); static void _bind_methods(); Ref mesh_data_resource;