Do not call setAccessoryViewDisclosed: for NSSavePanel This results in an immediate application exit (thanks Apple) and is unnecessary anyhow because save panels, unlike open ones, show the accessory view by default. This fixes fatal problem introduced in the recent 426f745c6b (Fix showing extra controls in wxFileDialog under macOS, 2025-08-22), see #25717. Co-authored-by: Stefan Csomor <cso...@advancedconcepts.ch>
... | ... | @@ -512,8 +512,12 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) |
512 | 512 | [accView removeFromSuperview];
|
513 | 513 | [panel setAccessoryView:accView];
|
514 | 514 | |
515 | + // We need to explicitly show the accessory view for "Open" file
|
|
516 | + // dialogs, but doing it for "Save" dialogs is not only unnecessary but
|
|
517 | + // results in an immediate application abort (see #25717).
|
|
515 | 518 | wxCLANG_WARNING_SUPPRESS(undeclared-selector)
|
516 | - if ([panel respondsToSelector:@selector(setAccessoryViewDisclosed:)])
|
|
519 | + if (!HasFlag(wxFD_SAVE) &&
|
|
520 | + [panel respondsToSelector:@selector(setAccessoryViewDisclosed:)])
|
|
517 | 521 | {
|
518 | 522 | [(id)panel setAccessoryViewDisclosed:YES];
|
519 | 523 | }
|
—
View it on GitLab.
You're receiving this email because of your account on gitlab.com. Manage all notifications · Help