Centralize retained popup tick overlays

This commit is contained in:
2026-06-12 14:45:04 +02:00
parent 7be588d763
commit 2e98efa13a
7 changed files with 51 additions and 20 deletions

View File

@@ -578,7 +578,10 @@ void NodePanelBrushPreset::init()
};
m_btn_menu = find<NodeButtonCustom>("btn-menu");
m_btn_menu->on_click = [this](Node* b) {
auto popup = add_child_file<NodePopupMenu>("data/dialogs/panel-brushes.xml", "tpl-brush-popup");
auto popup = std::dynamic_pointer_cast<NodePopupMenu>(
load_template("data/dialogs/panel-brushes.xml", "tpl-brush-popup"));
if (!popup)
return;
popup->SetPosition(b->m_pos.x + b->m_size.x, b->m_pos.y);
(void)pp::panopainter::attach_legacy_overlay_node_to_root(*this, popup);
root()->update();