pathview: dont clear path when modal is cancelled
This commit is contained in:
parent
451c4f0fde
commit
bf7c7b9169
1 changed files with 3 additions and 1 deletions
|
@ -181,7 +181,9 @@ impl PathView {
|
|||
file_select_panel.set_can_choose_files(true);
|
||||
file_select_panel.set_allows_multiple_selection(false);
|
||||
file_select_panel.show(move |v| {
|
||||
handler(v.first().map(|v| v.pathbuf()));
|
||||
if let Some(path) = v.first() {
|
||||
handler(Some(path.pathbuf()));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue