[Git][wxwidgets/wxwidgets][master] Do not call setAccessoryViewDisclosed: for NSSavePanel

0 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Aug 23, 2025, 2:27:37 PMAug 23
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 32ea27c3
    by Vadim Zeitlin at 2025-08-23T20:16:54+02:00
    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>
    

1 changed file:

Changes:

  • src/osx/cocoa/filedlg.mm
    ... ... @@ -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 Notification message regarding https://gitlab.com/wxwidgets/wxwidgets/-/commit/32ea27c34f4b88eb6d407c223d0b91c5c884554b at 1755973655

Reply all
Reply to author
Forward
0 new messages