Centralize retained floating panel closing
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user