Make sure to actually remove the signal registration too

This commit is contained in:
JeffR 2025-08-11 00:09:54 -05:00
parent 970aba9766
commit c2a46e4b45
2 changed files with 10 additions and 0 deletions

View file

@ -95,6 +95,15 @@ bool GuiInputCtrl::onAdd()
return false;
GuiCanvas::getCanvasSetActiveSignal().notify(this, &GuiInputCtrl::handleCanvasSetActive);
return true;
}
void GuiInputCtrl::onRemove()
{
GuiCanvas::getCanvasSetActiveSignal().remove(this, &GuiInputCtrl::handleCanvasSetActive);
Parent::onRemove();
}
bool GuiInputCtrl::onWake()

View file

@ -48,6 +48,7 @@ public:
GuiInputCtrl();
bool onAdd() override;
void onRemove() override;
// GuiControl.
bool onWake() override;