1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-18 00:50:05 +02:00

Fix option truncation and possible crash

This commit is contained in:
Leland Lucius 2015-08-25 21:19:53 -05:00
parent 3dec7153a3
commit 5bc61e5d0b

View File

@ -1,4 +1,4 @@
// ///
// Copied from wxWidgets 3.0.2 and modified to support additional features // Copied from wxWidgets 3.0.2 and modified to support additional features
// //
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@ -509,20 +509,17 @@ void FileDialog::SetupExtraControls(WXWindow nativeWindow)
m_filterPanel->SetSizer( verticalSizer ); m_filterPanel->SetSizer( verticalSizer );
m_filterPanel->Layout(); m_filterPanel->Layout();
NSSize ss = [[accView superview] frame].size;
wxSize ws = m_filterPanel->GetBestSize(); wxSize ws = m_filterPanel->GetBestSize();
ws.SetWidth( wxMax( (wxCoord) ss.width, ws.GetWidth() ) );
m_filterPanel->SetSize(ws); m_filterPanel->SetSize(ws);
m_filterPanel->SetMinSize(ws);
} }
if ( accView != nil ) if ( accView != nil )
{ {
[accView removeFromSuperview]; [accView removeFromSuperview];
[accView setAutoresizingMask:NSViewWidthSizable];
[panel setAccessoryView:accView]; [panel setAccessoryView:accView];
[accView setAutoresizingMask:NSViewWidthSizable];
} }
} }
@ -728,6 +725,8 @@ void FileDialog::ModalFinishedCallback(void* panel, int returnCode)
if ( m_delegate ) if ( m_delegate )
{ {
[[NSNotificationCenter defaultCenter] removeObserver:m_delegate];
[m_delegate release]; [m_delegate release];
m_delegate = nil; m_delegate = nil;
} }