Centralize layout unload destruction
This commit is contained in:
@@ -4,13 +4,14 @@
|
||||
#include "asset.h"
|
||||
#include "node.h"
|
||||
#include "node_border.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "layout.h"
|
||||
#include "platform_api/asset_file_load_policy.h"
|
||||
|
||||
void LayoutManager::unload()
|
||||
{
|
||||
for (auto& l : m_layouts)
|
||||
l.second->destroy();
|
||||
pp::panopainter::destroy_legacy_node(*l.second);
|
||||
m_layouts.clear();
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ void bind_legacy_popup_close_destroys_overlay(
|
||||
{
|
||||
popup.on_popup_close = [overlay](Node*) {
|
||||
if (overlay) {
|
||||
overlay->destroy();
|
||||
destroy_legacy_node(*overlay);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user