+ if(mode!=SELECT || selection.empty())
+ return;
+
+ TrackProperties *track_prop = new TrackProperties(selection);
+ root.add(*track_prop);
+ const GLtk::Geometry &root_geom = root.get_geometry();
+ const GLtk::Geometry &dlg_geom = track_prop->get_geometry();
+ track_prop->set_position((root_geom.w-dlg_geom.w)/2, (root_geom.h-dlg_geom.h)/2);
+
+ track_prop->signal_response.connect(sigc::mem_fun(this, &Designer::track_properties_response));
+}
+
+void Designer::extend_track()
+{
+ if(mode!=SELECT)
+ return;
+
+ if(manipulator.start_extend())
+ mode = MANIPULATE;
+}
+
+void Designer::connect_tracks()
+{
+ if(mode!=SELECT)
+ return;
+
+ manipulator.connect();
+}
+
+void Designer::flatten_tracks()
+{
+ if(mode!=SELECT)
+ return;
+
+ manipulator.flatten();
+}
+
+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;
+ cur_zone = 0;
+ if(cur_route)
+ show_route(*cur_route);
+ else
+ clear_paths();
+}
+
+void Designer::rename_route()
+{
+ if(mode!=SELECT || !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));