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