17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-01 08:02:10 +01:00

feat(editor): the signalling, the hectometre posts and the terrain go to layers of their own: <scenery>_srk.scm, _hektometry.scm, _teren.scm, made by the first of them and included by the scenario file, the active layer left as it is; the station descriptions of the signalling there too

This commit is contained in:
maj00r
2026-10-23 13:07:14 +02:00
parent d14b4534ee
commit fe3dd758ea
10 changed files with 85 additions and 21 deletions

View File

@@ -558,7 +558,7 @@ void node_layers::stat(layer_handle const Layer)
}
// creates empty layer, included from specified one. returns: handle to the new layer, or null_handle with the explanation in Reason
layer_handle node_layers::create(std::string Name, layer_handle Parent, std::string &Reason)
layer_handle node_layers::create(std::string Name, layer_handle Parent, std::string &Reason, bool const Activate)
{
Parent = resolve(Parent);
if (false == valid(Parent) || layer(Parent).removed || layer(Parent).binary)
@@ -639,7 +639,10 @@ layer_handle node_layers::create(std::string Name, layer_handle Parent, std::str
created.context_begin = valid(anchor) ? layer(anchor).context_end : layer(Parent).context_insert();
created.context_end = created.context_begin;
active(layerhandle);
if (Activate)
{
active(layerhandle);
}
return layerhandle;
}