You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I posted this issue to the slint repository but now after testing with Linux it seems more likely that the problem is in the RFD crate.
I'm using the rfd crate to create a Save Dialog for my slint application on Windows 10.
The Save Dialog works perfectly except when I select an existing file and click the save button (on the save dialog). The Save Dialog stays open and both the Slint UI and the Save Dialog lock up refusing to respond to buttons and controls.
Nothing can stop the process except 'kill terminal' in VSCode.
A simple test project with just the rfd crate ...and Save Dialog works fine.
The overwrite file message box opens and the Save Dialog closes if user responds to 'Overwrite existing file?' with 'Yes' as expected!
I put the rfd code inside a closure that runs when a slint save button is pressed
I'm not 100% sure if this is some bug in slint, rfd or am I doing something incorrectly?
Today I tried compiling on Linux Mint 21.2, Cinnamon v5.8.4, Linux Kernel: 5.15.0-88-generic. On Linux everything works fine, No issues at all! I will post this issue to RFD git as well because now it seems more likely that the problem is coming from the rfd crate.
main_window.on_save_pressed(move |x, y| {
let file = match save_dialog() {
Some(s) => s,
None => return,
};
//... doing stuff with the returned string...
//... doing stuff with x, y parameters...
//... doing stuff with a weak pointer to main_window...
});
use rfd::FileDialog;
fn save_dialog() -> Option<String> {
let file = FileDialog::new()
.set_file_name("Output.exr")
.add_filter("Open EXR", &["exr"])
.set_title("Save As 32bit EXR")
.save_file();
match file {
Some(f) => Some(f.into_os_string().into_string().unwrap()),
None => None,
}
}
The text was updated successfully, but these errors were encountered:
With my limited skills I tried to run in debug mode with VSCode and the farthest I can trace it are these two functions:
rfd-0.12.1\src\backend\win_cid\utils.rs --> init_com function on line 28. calls
rfd-0.12.1\src\backend\win_cid\file_dialog.rs --> line 106: impl FileSaveDialogImpl for FileDialog --> line 111: dialog.show()?;
The dialog opens on line 111 and becomes interactive. But after pressing save to overwrite an existing file everything freezes. Probably it is some unsafe interface with windows API or something causing the problem?
Ill add that this is also a issue on windows 11. It seems almost random when it decides to do it as I have gotten it to work only to relaunch and have it not work.
Hello! I posted this issue to the slint repository but now after testing with Linux it seems more likely that the problem is in the RFD crate.
I'm using the rfd crate to create a Save Dialog for my slint application on Windows 10.
The Save Dialog works perfectly except when I select an existing file and click the save button (on the save dialog).
The Save Dialog stays open and both the Slint UI and the Save Dialog lock up refusing to respond to buttons and controls.
Nothing can stop the process except 'kill terminal' in VSCode.
A simple test project with just the rfd crate ...and Save Dialog works fine.
The overwrite file message box opens and the Save Dialog closes if user responds to 'Overwrite existing file?' with 'Yes' as expected!
I put the rfd code inside a closure that runs when a slint save button is pressed
I'm not 100% sure if this is some bug in slint, rfd or am I doing something incorrectly?
Today I tried compiling on Linux Mint 21.2, Cinnamon v5.8.4, Linux Kernel: 5.15.0-88-generic.
On Linux everything works fine, No issues at all! I will post this issue to RFD git as well because now it seems more likely that the problem is coming from the rfd crate.
The text was updated successfully, but these errors were encountered: