Centralize retained popup panel closing

This commit is contained in:
2026-06-12 15:19:31 +02:00
parent bbdc746426
commit a63246f716
9 changed files with 34 additions and 25 deletions

View File

@@ -174,10 +174,7 @@ kEventResult NodePanelBrush::handle_event(Event* e)
case kEventType::MouseUpL:
if (!m_mouse_inside)
{
mouse_release();
m_parent->remove_child(this);
if (on_popup_close)
on_popup_close(this);
pp::panopainter::close_legacy_popup_panel(*this, on_popup_close);
}
break;
default:
@@ -668,10 +665,7 @@ kEventResult NodePanelBrushPreset::handle_event(Event* e)
case kEventType::MouseUpL:
if (!m_mouse_inside)
{
mouse_release();
m_parent->remove_child(this);
if (on_popup_close)
on_popup_close(this);
pp::panopainter::close_legacy_popup_panel(*this, on_popup_close);
}
break;
default: