MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / GetTargetDirectoryNode

Method GetTargetDirectoryNode

src/gui/browserpanel.cc:360–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358 }
359
360 std::shared_ptr<FilesystemNode> GetTargetDirectoryNode(wxDataViewItem& item)
361 {
362 Path path;
363 if (item.IsOk())
364 {
365 auto node = _filesystemModel->Find(item);
366 if (!node)
367 return nullptr;
368 path = node->dirent->path;
369 }
370
371 auto node = _filesystemModel->Find(path);
372 if (!node)
373 return nullptr;
374 if (node->dirent->file_type != TYPE_DIRECTORY)
375 return _filesystemModel->Find(path.parent());
376 return node;
377 }
378
379 void OnBrowserAddMenuItem(wxCommandEvent&) override
380 {

Callers

nothing calls this directly

Calls 2

FindMethod · 0.80
parentMethod · 0.80

Tested by

no test coverage detected