Centralize retained popup tick overlays
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user