Ticket #47567: fontdlgosx.diff

File fontdlgosx.diff, 959 bytes (added by alex@…, 10 years ago)

patch

  • src/osx/carbon/fontdlgosx.mm

     
    162162    [[fontPanel standardWindowButton:NSWindowCloseButton] setEnabled:NO] ;
    163163
    164     wxMacFontPanelAccView* accessoryView = (wxMacFontPanelAccView*) [fontPanel accessoryView] ;
    165     if ( accessoryView == nil)
     164    wxMacFontPanelAccView* accessoryView = nil;
     165    if ( [fontPanel accessoryView] == nil || [[fontPanel accessoryView] class] != [wxMacFontPanelAccView class] )
    166166    {
    167167        NSRect rectBox = NSMakeRect( 0 , 0 , 192 , 40 );
     
    171171
    172172        [fontPanel setDefaultButtonCell:[[accessoryView okButton] cell]] ;
     173    }
     174    else
     175    {
     176        accessoryView = (wxMacFontPanelAccView*)[fontPanel accessoryView];
    173177    }
    174178