- 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));
- }
+ ObjectProperties *dlg = new ObjectProperties(selection);
+ root.add(*dlg);
+ root_layout->set_gravity(*dlg, 0, 0);
+
+ dlg->signal_response.connect(sigc::mem_fun(this, &Designer::object_properties_response));
+}
+
+void Designer::extend_track()
+{
+ use_tool_with_selected_objects<ExtendTool>();
+}
+
+void Designer::connect_tracks()
+{
+ use_tool_with_selected_objects<ExtendTool>()->connect();
+}
+
+void Designer::flatten_tracks()
+{
+ use_tool_with_selected_objects<SlopeTool>()->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));
+ root.add(*input);
+ root_layout->set_gravity(*input, 0, 0);
+}
+
+void Designer::edit_route(Route *r)
+{
+ cur_route = r;
+ cur_zone = 0;
+ if(cur_route)
+ show_route(*cur_route);
+ else
+ clear_paths();