MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / SaveProjectConf

Method SaveProjectConf

Project.cpp:739–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

737}
738
739void 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
766bool Project::IsFileDataSource()
767{

Callers 4

OnCloseProjectMethod · 0.80
OnSaveProjectMethod · 0.80
OnSaveAsProjectMethod · 0.80
OnOkClickMethod · 0.80

Calls 10

GetIdsMethod · 0.80
SetFilePathMethod · 0.80
IsEmptyMethod · 0.45
GetFilePathMethod · 0.45
IsTimeVariantMethod · 0.45
sizeMethod · 0.45
GetOGRConnectStrMethod · 0.45
GetNameMethod · 0.45
SaveMethod · 0.45

Tested by

no test coverage detected