mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-08 18:50:34 +01:00
refactor(editor): the trainset is a tool of its own
The fourth tool out of editor_mode. The track under the cursor and the first steps of the tutorial become types of their own, which the editor gives to the tools, and a tool shown as a tab of the lineside panel keeps its open and expanded flags in a tool_tab. The trainsets waiting for the save are handed to the editor by the tool, which hears back when they were written. The self-test command trainset moves with it.
This commit is contained in:
@@ -388,7 +388,7 @@ editor_mode::selftest_result editor_mode::selftest_sweep(std::string const &comm
|
||||
std::string tab;
|
||||
words >> tab;
|
||||
show_track_tab(tab == "parallel" ? track_tab::parallel : track_tab::lineside);
|
||||
(tab == "vehicle" ? m_vehicle.expand : tab == "hekto" ? m_hekto.expand : tab == "fouling" ? m_fouling.expand : m_parallel.expand) = true;
|
||||
(tab == "vehicle" ? m_vehicle.tab().expand : tab == "hekto" ? m_hekto.expand : tab == "fouling" ? m_fouling.expand : m_parallel.expand) = true;
|
||||
return selftest_result::handled;
|
||||
}
|
||||
if (command == "bendpanel")
|
||||
|
||||
Reference in New Issue
Block a user