Centralize retained message dialog close callbacks
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "pch.h"
|
||||
#include "log.h"
|
||||
#include "legacy_ui_overlay_services.h"
|
||||
#include "node_message_box.h"
|
||||
#include "layout.h"
|
||||
|
||||
@@ -23,7 +24,7 @@ void NodeMessageBox::init()
|
||||
on_submit(this);
|
||||
};
|
||||
btn_cancel = find<NodeButton>("btn-cancel");
|
||||
on_submit = btn_cancel->on_click = [&](Node*) { destroy(); };
|
||||
on_submit = btn_cancel->on_click = pp::panopainter::legacy_destroy_node_callback(*this);
|
||||
m_capture_children = false; // don't capture children events on mouse_capture
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user