| 305 | } |
| 306 | |
| 307 | void OnBrowserSaveButton(wxCommandEvent&) override |
| 308 | { |
| 309 | auto item = browserTree->GetSelection(); |
| 310 | auto node = _filesystemModel->Find(item); |
| 311 | |
| 312 | GetfileDialog d(this, wxID_ANY); |
| 313 | d.filenameText->SetValue(node->dirent->path.to_str()); |
| 314 | d.targetFilePicker->SetFileName(wxFileName(node->dirent->filename)); |
| 315 | d.targetFilePicker->SetFocus(); |
| 316 | d.buttons_OK->SetDefault(); |
| 317 | if (d.ShowModal() != wxID_OK) |
| 318 | return; |
| 319 | |
| 320 | auto localPath = d.targetFilePicker->GetPath().ToStdString(); |
| 321 | QueueJob( |
| 322 | [this, node, localPath]() |
| 323 | { |
| 324 | auto bytes = _filesystem->getFile(node->dirent->path); |
| 325 | bytes.writeToFile(localPath); |
| 326 | }); |
| 327 | } |
| 328 | |
| 329 | /* Called from worker thread only! */ |
| 330 | Path ResolveFileConflicts_WT(Path path) |
nothing calls this directly
no test coverage detected