MCPcopy Index your code
hub / github.com/encounter/objdiff / set_project_dir

Method set_project_dir

objdiff-gui/src/app.rs:266–287  ·  view source on GitHub ↗
(&mut self, path: Utf8PlatformPathBuf)

Source from the content-addressed store, hash-verified

264
265impl AppState {
266 pub fn set_project_dir(&mut self, path: Utf8PlatformPathBuf) {
267 self.config.recent_projects.retain(|p| p != &path);
268 if self.config.recent_projects.len() > 9 {
269 self.config.recent_projects.truncate(9);
270 }
271 self.config.recent_projects.insert(0, path.to_string());
272 self.config.project_dir = Some(path);
273 self.config.target_obj_dir = None;
274 self.config.base_obj_dir = None;
275 self.config.selected_obj = None;
276 self.config.build_target = false;
277 self.objects.clear();
278 self.object_nodes.clear();
279 self.watcher_change = true;
280 self.config_change = true;
281 self.obj_change = true;
282 self.queue_build = false;
283 self.current_project_config = None;
284 self.project_config_info = None;
285 self.selecting_left = None;
286 self.selecting_right = None;
287 }
288
289 pub fn set_target_obj_dir(&mut self, path: Utf8PlatformPathBuf) {
290 self.config.target_obj_dir = Some(path);

Callers 3

newMethod · 0.80
updateMethod · 0.80
pre_updateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected