Try only setting the window on macos
This commit is contained in:
parent
8ed1019b44
commit
a926f19f79
|
|
@ -19,7 +19,9 @@ impl FilePicker {
|
|||
}
|
||||
|
||||
pub fn new_dialog(&self) -> FileDialogBuilder {
|
||||
#[allow(unused_mut)]
|
||||
let mut dialog = rfd::AsyncFileDialog::new();
|
||||
#[cfg(target_os = "macos")]
|
||||
if let Some(window) = self.window.as_ref().and_then(|w| w.upgrade()) {
|
||||
dialog = dialog.set_parent(&window);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue