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 )
|
||||
{
|
||||
wxDirDialog *browseDialog = new wxDirDialog ( this );
|
||||
if ( browseDialog->ShowModal() == wxID_OK )
|
||||
applicationDirEdit->SetValue ( browseDialog->GetPath() );
|
||||
wxDirDialog browseDir ( this );
|
||||
browseDir.SetPath ( applicationDirEdit->GetValue() );
|
||||
if ( browseDir.ShowModal() == wxID_OK )
|
||||
applicationDirEdit->SetValue ( browseDir.GetPath() );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue