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
` auto m = pfd::message(title, description, pfd::choice::yes_no_cancel, pfd::icon::warning);
pfd::button btn = m.result();
Log((int32_t) btn);
switch(btn) {
case pfd::button::yes: return PopupResult::Yes;
case pfd::button::no: return PopupResult::No;
case pfd::button::cancel: return PopupResult::Cancel;
default: return PopupResult::Invalid;
}`
This code returns PopupResult::Invalid when clicking on the button "No" or "Cancel", and the Log((int32_t) btn); prints 0 into the console on both cases, which is equal to pfd::button::ok. But prints 1 (pfd::button::yes) when pressing the button "Yes".
Also, when this code runs, it freezes the application (the title of the window says "Not Responding") and after a few seconds it shows me a dialog saying "This application is not responding, do you wish to terminate it or keep waiting ?".
I am running on Manjaro KDE, and using kdialog.
The text was updated successfully, but these errors were encountered:
Also I did some digging and found that inside pfd::message::result "ret" is always empty, and m_mappings[exit_code] is pfd::button::no. When I press "Yes", exit_code is equal to 0 and m_mappings[exit_code] is equal to pfd::button::yes (1). When I press "No" exit_code is 1, m_mappings[exit_code] is pfd::button::ok (0) and when I press "Cancel" exit_code is 2, but m_mappings[exit_code] is pfd::button::ok (0).
samangh
added a commit
to samangh/portable-file-dialogs
that referenced
this issue
Mar 11, 2024
` auto m = pfd::message(title, description, pfd::choice::yes_no_cancel, pfd::icon::warning);
pfd::button btn = m.result();
Log((int32_t) btn);
This code returns PopupResult::Invalid when clicking on the button "No" or "Cancel", and the
Log((int32_t) btn);
prints 0 into the console on both cases, which is equal to pfd::button::ok. But prints 1 (pfd::button::yes) when pressing the button "Yes".Also, when this code runs, it freezes the application (the title of the window says "Not Responding") and after a few seconds it shows me a dialog saying "This application is not responding, do you wish to terminate it or keep waiting ?".
I am running on Manjaro KDE, and using kdialog.
The text was updated successfully, but these errors were encountered: