mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-29 06:57:29 +01:00
refactor(editor): the tools get the roles of the editor they need, not all of it
editor_services was growing into one interface every tool depended on whole. It splits into the roles the editor plays for its tools: the selection, the view, the undo history, the templates by the track, the ground with the terrain model, the track design and the guide of the first steps. Each tool is handed only the roles it uses, so what it depends on can be read from its constructor; editor_services stays as the sum of the roles the editor implements.
This commit is contained in:
@@ -2236,13 +2236,13 @@ class editor_mode : public application_mode, private editor_track::observer, pri
|
||||
void infra_attach(EditorSnapshot &Snapshot);
|
||||
void render_infra_body();
|
||||
|
||||
gauge_tool m_gauge{*this};
|
||||
speed_tool m_speed{*this};
|
||||
joints_tool m_joints{*this};
|
||||
vehicle_tool m_vehicle{*this};
|
||||
hekto_tool m_hekto{*this};
|
||||
fouling_tool m_fouling{*this};
|
||||
parallel_tool m_parallel{*this};
|
||||
gauge_tool m_gauge{*this, *this, *this, *this};
|
||||
speed_tool m_speed{*this, *this, *this, *this};
|
||||
joints_tool m_joints{*this, *this, *this, *this};
|
||||
vehicle_tool m_vehicle{*this, *this};
|
||||
hekto_tool m_hekto{*this, *this, *this, *this, *this, *this};
|
||||
fouling_tool m_fouling{*this, *this, *this, *this, *this};
|
||||
parallel_tool m_parallel{*this, *this, *this, *this};
|
||||
std::vector<editor_tool *> m_tools{&m_gauge, &m_speed, &m_joints, &m_vehicle, &m_hekto, &m_fouling, &m_parallel};
|
||||
|
||||
void infra_rebase();
|
||||
|
||||
Reference in New Issue
Block a user