mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-20 03:19:19 +02:00
Add isolation list to track tooltips
If a track is hovered when debug mode is on, it will now also show the names of isolated circuits the track belongs to, if any.
This commit is contained in:
13
Track.cpp
13
Track.cpp
@@ -2364,6 +2364,19 @@ TTrack::export_as_text_( std::ostream &Output ) const {
|
||||
<< "\n";
|
||||
}
|
||||
|
||||
// Returns the tooltip of this Track, which may contain a list of isolations if the track belongs to any.
|
||||
std::string TTrack::tooltip() const
|
||||
{
|
||||
std::string tooltip = this->name();
|
||||
if (!Isolated.empty())
|
||||
{
|
||||
tooltip += "\nIsolated:";
|
||||
for (const auto isolation : Isolated)
|
||||
tooltip += " " + isolation->asName;
|
||||
}
|
||||
return tooltip;
|
||||
}
|
||||
|
||||
// locates specified profile in the profile database, potentially loading it from a file
|
||||
// returns: pair <profile name, profile handle>
|
||||
std::pair<std::string, int>
|
||||
|
||||
Reference in New Issue
Block a user