Widen the unique pointer a bit more.

This commit is contained in:
2025-04-18 05:20:26 -04:00
parent f4e70bfa75
commit f63c1209a9
4 changed files with 10 additions and 8 deletions

View File

@ -425,18 +425,16 @@ void Layout::removeWidget ()
updateCursor ();
}
void Layout::setWidget (Widget *widget)
void Layout::setWidget (std::unique_ptr< Widget > widget)
{
DBG_OBJ_ASSOC_CHILD (widget);
DBG_OBJ_ASSOC_CHILD (widget.get());
widgetAtPoint = NULL;
if (topLevel) {
topLevel.reset();
}
textZone->zoneFree ();
std::unique_ptr< Widget > widget_unique;
widget_unique.reset( widget );
addWidget (std::move( widget_unique ));
addWidget (std::move( widget ));
updateCursor ();