- if(route && route->has_track(**i))
- {
- t3d.get_path().set_color(GL::Color(0.5, 0.8, 1.0));
- if((*i)->get_type().is_turnout())
- {
- unsigned tid = (*i)->get_turnout_id();
- int path = (tid ? route->get_turnout(tid) : -1);
- if(path>=0)
- t3d.get_path().set_path(path);
- else
- t3d.get_path().set_mask((*i)->get_type().get_paths());
- }
- else
- t3d.get_path().set_path(0);
- }
+ t3d.get_path().set_mask(0);
+ }
+}
+
+void Designer::show_route(const Route &route)
+{
+ clear_paths();
+
+ const set<Track *> &rtracks = route.get_tracks();
+ for(set<Track *>::iterator i=rtracks.begin(); i!=rtracks.end(); ++i)
+ {
+ Track3D &t3d = layout_3d->get_track(**i);
+ t3d.get_path().set_color(GL::Color(0.5, 0.8, 1.0));
+ int path = -1;
+ if(unsigned tid = (*i)->get_turnout_id())
+ path = route.get_turnout(tid);
+ if(path>=0)
+ t3d.get_path().set_path(path);