+ const set<Track *> &tracks = selection.get_tracks();
+ bool ok = false;
+ int id = -1;
+ for(set<Track *>::const_iterator i=tracks.begin(); i!=tracks.end(); ++i)
+ {
+ if(!(*i)->get_type().is_turnout())
+ ok = true;
+ if(static_cast<int>((*i)->get_sensor_id())!=id)
+ {
+ if(id==-1)
+ id = (*i)->get_sensor_id();
+ else
+ id = -2;
+ }
+ }
+
+ if(ok)
+ {
+ InputDialog *input = new InputDialog(*this, "Sensor ID", (id>=0 ? lexical_cast(id) : string()));
+ input->signal_accept.connect(sigc::mem_fun(this, &Designer::sensor_id_accept));
+ }
+}
+
+void Designer::rename_route()
+{
+ if(!cur_route)
+ return;
+
+ InputDialog *input = new InputDialog(*this, "Route name", cur_route->get_name());
+ input->signal_accept.connect(sigc::mem_fun(this, &Designer::route_name_accept));
+}
+
+void Designer::svg_export()
+{
+ InputDialog *input = new InputDialog(*this, "SVG export", FS::basepart(filename)+".svg");
+ input->signal_accept.connect(sigc::mem_fun(this, &Designer::svg_export_accept));
+}
+
+void Designer::edit_route(Route *r)
+{
+ cur_route = r;
+ show_route(r);