17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

refactor(editor): track observer instead of the function hooks

This commit is contained in:
maj00r
2026-10-04 00:37:26 +02:00
parent 7b8d809078
commit c85a52d5b1
5 changed files with 43 additions and 35 deletions

View File

@@ -344,9 +344,14 @@ editor_mode::editor_mode() {
m_orthophoto.ground_source([](glm::dvec2 const &Min, glm::dvec2 const &Max, std::vector<world_triangle> &Out) {
gather_ground_triangles(Min, Max, true, 50.0f, Out);
});
infra_hooks();
editor_track::observe(this);
}
editor_mode::~editor_mode()
{
editor_track::observe(nullptr);
}
editor_ui *editor_mode::ui() const
{
return static_cast<editor_ui *>(m_userinterface.get());