Centralize retained floating panel closing

This commit is contained in:
2026-06-12 15:59:45 +02:00
parent b32ad1b720
commit 32cea98661
3 changed files with 8 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
#include "pch.h"
#include "node_panel_floating.h"
#include "legacy_ui_overlay_services.h"
#include "log.h"
Node* NodePanelFloating::clone_instantiate() const
@@ -46,7 +47,7 @@ void NodePanelFloating::init_controls()
m_button_close = find<NodeButton>("button-close");
m_button_close->on_click = [this](Node*) {
m_container->remove_all_children();
destroy();
pp::panopainter::close_legacy_dialog_node(*this);
};
}
@@ -176,7 +177,7 @@ kEventResult NodePanelFloating::handle_event(Event* e)
if (m_outline)
{
outline_pos = m_outline->m_pos;
m_outline->destroy();
pp::panopainter::close_legacy_dialog_node(*m_outline);
}
int drop_pos = 0;
if (m_drop_placeholder)