| 737 | } |
| 738 | |
| 739 | void Project::SaveProjectConf() |
| 740 | { |
| 741 | wxLogMessage("Entering Project::SaveProjectConf"); |
| 742 | if (project_conf->GetFilePath().IsEmpty() && |
| 743 | (GetTableInt()->IsTimeVariant() || |
| 744 | (w_man_int && w_man_int->GetIds().size()>0)) ) { |
| 745 | |
| 746 | // save project file at the same directory of the file datasource |
| 747 | if ( IsFileDataSource()) { |
| 748 | wxString ds_path = datasource->GetOGRConnectStr(); |
| 749 | bool wd_success = SetWorkingDir(ds_path); |
| 750 | if (wd_success) { |
| 751 | wxFileName temp(ds_path); |
| 752 | proj_file_no_ext = temp.GetName(); |
| 753 | wxString prj_path = GetProjectFullPath(); |
| 754 | project_conf->SetFilePath(prj_path); |
| 755 | } |
| 756 | } |
| 757 | } |
| 758 | if (!project_conf->GetFilePath().IsEmpty()) { |
| 759 | UpdateProjectConf(); |
| 760 | project_conf->Save(project_conf->GetFilePath()); |
| 761 | GetTableInt()->SetProjectChangedSinceLastSave(false); |
| 762 | } |
| 763 | wxLogMessage("Exiting Project::SaveProjectConf"); |
| 764 | } |
| 765 | |
| 766 | bool Project::IsFileDataSource() |
| 767 | { |
no test coverage detected