| 259 | } |
| 260 | |
| 261 | void Project::UpdateProjectConf(ProjectConfiguration* conf) |
| 262 | { |
| 263 | wxLogMessage("Project::UpdateProjectConf()"); |
| 264 | LayerConfiguration* layer_conf = conf->GetLayerConfiguration(); |
| 265 | wxString _layername = layer_conf->GetName(); |
| 266 | IDataSource* _ds = layer_conf->GetDataSource(); |
| 267 | |
| 268 | if (layername == _layername) { |
| 269 | // we only update Custom Categories |
| 270 | // first correct variable_order |
| 271 | std::vector<wxString> var_list = layer_proxy->GetFieldNames(); |
| 272 | std::vector<GdaConst::FieldType> var_types = layer_proxy->GetFieldTypes(); |
| 273 | VarOrderPtree* variable_order = layer_conf->GetVarOrderPtree(); |
| 274 | variable_order->CorrectVarGroups(var_list, var_types, |
| 275 | IsFieldCaseSensitive()); |
| 276 | project_conf->GetLayerConfiguration()->SetVariableOrder(variable_order); |
| 277 | table_int->Update(*variable_order); |
| 278 | } else { |
| 279 | wxString msg = _("Update project information failed. \n\nDetails: The layer information defined in project file does no match opened datasource."); |
| 280 | throw GdaException(msg.c_str()); |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | GdaConst::DataSourceType Project::GetDatasourceType() |
| 285 | { |
no test coverage detected