Also handle NOTIFICATION_PAINT_NODE_RESIZED in PaintVisualGrid and PaintCanvasBackground. Note that they won't yet get that notification.

This commit is contained in:
Relintai 2022-11-19 13:21:05 +01:00
parent 50cf64b7f1
commit cebc26f3ce
3 changed files with 4 additions and 3 deletions

View File

@ -17,7 +17,6 @@ public:
NOTIFICATION_PAINT_PROJECT_POST_SAVE = 2502,
};
Vector2i get_size();
void set_size(const Vector2i &size);

View File

@ -81,7 +81,8 @@ PaintCanvasBackground::~PaintCanvasBackground() {
void PaintCanvasBackground::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
case NOTIFICATION_ENTER_TREE:
case PaintNode::NOTIFICATION_PAINT_NODE_RESIZED: {
PaintNode *pn = get_paint_node();
if (pn) {

View File

@ -60,7 +60,8 @@ PaintNode *PaintVisualGrid::get_paint_node() {
void PaintVisualGrid::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
case NOTIFICATION_ENTER_TREE:
case PaintNode::NOTIFICATION_PAINT_NODE_RESIZED: {
PaintNode *pn = get_paint_node();
if (pn) {