mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-03 01:30:16 +01:00
refactor(editor): the parallel track is a tool of its own
The seventh tool out of editor_mode. It reads the selected set of tracks and the tab shown through the services, digitizes the tracks it lays and refreshes the plan after it sets one parallel to another. The panel shown for two selected tracks is a public call of the tool, and the self-test command parallel moves with it and lays the same tracks as before.
This commit is contained in:
@@ -72,6 +72,16 @@ editor_mode::track_hover const &editor_mode::hovered_track() const
|
||||
return m_hover;
|
||||
}
|
||||
|
||||
std::vector<TTrack *> const &editor_mode::track_set() const
|
||||
{
|
||||
return m_track_set;
|
||||
}
|
||||
|
||||
editor_track_tab editor_mode::current_track_tab() const
|
||||
{
|
||||
return m_track_tab;
|
||||
}
|
||||
|
||||
void editor_mode::set_current_node(scene::basic_node *Node)
|
||||
{
|
||||
m_node = Node;
|
||||
@@ -558,7 +568,7 @@ void editor_mode::render_track_inspector()
|
||||
m_sweep.open = false;
|
||||
m_hekto.tab().open = false;
|
||||
m_fouling.tab().open = false;
|
||||
m_parallel.open = false;
|
||||
m_parallel.tab().open = false;
|
||||
m_vehicle.tab().open = false;
|
||||
}
|
||||
ui()->set_track(m_track_window_open);
|
||||
@@ -611,7 +621,7 @@ void editor_mode::render_track_tool_options()
|
||||
render_lay_ui();
|
||||
break;
|
||||
case track_tab::parallel:
|
||||
render_parallel_ui();
|
||||
m_parallel.render_options();
|
||||
break;
|
||||
case track_tab::turnout:
|
||||
if (track != nullptr && track->eType == tt_Switch)
|
||||
|
||||
Reference in New Issue
Block a user