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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user