Selected original directory when setting a new one
And fixed a memory leak
This commit is contained in:
parent
13b5bb6a87
commit
39613729e9
|
@ -293,7 +293,8 @@ void MyPropertySheet::OnOk ( wxCommandEvent& e )
|
||||||
|
|
||||||
void MyPropertySheet::OnApplicationDirBrowse ( wxCommandEvent& e )
|
void MyPropertySheet::OnApplicationDirBrowse ( wxCommandEvent& e )
|
||||||
{
|
{
|
||||||
wxDirDialog *browseDialog = new wxDirDialog ( this );
|
wxDirDialog browseDir ( this );
|
||||||
if ( browseDialog->ShowModal() == wxID_OK )
|
browseDir.SetPath ( applicationDirEdit->GetValue() );
|
||||||
applicationDirEdit->SetValue ( browseDialog->GetPath() );
|
if ( browseDir.ShowModal() == wxID_OK )
|
||||||
|
applicationDirEdit->SetValue ( browseDir.GetPath() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue