diff --git a/DialogTools/AutoUpdateDlg.cpp b/DialogTools/AutoUpdateDlg.cpp index 6e62f7d1b..7a3cb6021 100644 --- a/DialogTools/AutoUpdateDlg.cpp +++ b/DialogTools/AutoUpdateDlg.cpp @@ -168,11 +168,16 @@ wxString AutoUpdate::CheckUpdate() } // could be a testing version - if (isTestMode - && update_build >= Gda::version_build // e.g. 1.8.5 vs 1.8.4 - && update_build % 2 == 1 // e.g. 1.8.5 - && update_subbuild >= 0 ) { // 1.8.5.1 - return version; + if (isTestMode) { + if (update_build > Gda::version_build) { // e.g. 1.8.5 vs 1.8.4 + return version; + } + if (update_build == Gda::version_build && update_build %2 == 1) { + // e.g. 1.8.5 + if ( update_subbuild > Gda::version_subbuild) { + return version; + } + } } return ""; diff --git a/DialogTools/FieldNameCorrectionDlg.cpp b/DialogTools/FieldNameCorrectionDlg.cpp index 998663a3e..a684c8178 100644 --- a/DialogTools/FieldNameCorrectionDlg.cpp +++ b/DialogTools/FieldNameCorrectionDlg.cpp @@ -49,15 +49,19 @@ ScrolledWidgetsPane::ScrolledWidgetsPane(wxWindow* parent, wxWindowID id, wxString field_name = all_fname[i]; field_names_dict[field_name] = field_name; + bool isValid = true; if (!IsFieldNameValid(field_name) ) { bad_fnames.insert(field_name); + isValid = false; } else if (uniq_upper_fname.find(field_name.Upper()) != uniq_upper_fname.end()) { dup_fname.insert(field_name); + isValid = false; } uniq_upper_fname.insert(field_name.Upper()); - merged_field_names.push_back(field_name); + if (isValid) + merged_field_names.push_back(field_name); } if (!bad_fnames.empty() || !dup_fname.empty()) { need_correction = true; @@ -129,10 +133,53 @@ void ScrolledWidgetsPane::Init(vector& merged_field_names, wxStaticText* txt_orest=new wxStaticText(this, wxID_ANY, "Field restrictions:"); sizer->Add(txt_orest, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 15); + size_t ctrl_cnt = 0; + + for (set::iterator it=dup_fname.begin(); + it != dup_fname.end(); ++it ) { + wxString field_name = *it; + warn_msg=DUP_WARN; + + wxString id_name1, id_name2, id_name3; + id_name1 << "ID_FNAME_STAT_TXT_BASE" << ctrl_cnt; + id_name2 << "ID_INPUT_TXT_CTRL_BASE" << ctrl_cnt; + id_name3 << "ID_INFO_STAT_TXT_BASE" << ctrl_cnt; + + wxString user_field_name = GetSuggestFieldName(field_name); + txt_fname.push_back(new wxStaticText(this, XRCID(id_name1), field_name)); + sizer->Add(txt_fname[ctrl_cnt], 0, wxALIGN_LEFT|wxALL, 5); + txt_input.push_back(new wxTextCtrl(this, XRCID(id_name2), user_field_name, wxDefaultPosition,wxSize(240,-1))); + sizer->Add(txt_input[ctrl_cnt], 0, wxALIGN_LEFT|wxALL, 5); + txt_info.push_back(new wxStaticText(this, XRCID(id_name3), warn_msg)); + sizer->Add(txt_info[ctrl_cnt], 0, wxALIGN_LEFT|wxALL, 5); + + ++ctrl_cnt; + } - size_t ctrl_cnt = 0; + for (set::iterator it=bad_fname.begin(); + it != bad_fname.end(); ++it ) { + wxString field_name = *it; + warn_msg=INV_WARN; + + wxString id_name1, id_name2, id_name3; + id_name1 << "ID_FNAME_STAT_TXT_BASE" << ctrl_cnt; + id_name2 << "ID_INPUT_TXT_CTRL_BASE" << ctrl_cnt; + id_name3 << "ID_INFO_STAT_TXT_BASE" << ctrl_cnt; + + wxString user_field_name = GetSuggestFieldName(field_name); + txt_fname.push_back(new wxStaticText(this, XRCID(id_name1), field_name)); + sizer->Add(txt_fname[ctrl_cnt], 0, wxALIGN_LEFT|wxALL, 5); + txt_input.push_back(new wxTextCtrl(this, XRCID(id_name2), user_field_name, wxDefaultPosition,wxSize(240,-1))); + sizer->Add(txt_input[ctrl_cnt], 0, wxALIGN_LEFT|wxALL, 5); + txt_info.push_back(new wxStaticText(this, XRCID(id_name3), warn_msg)); + sizer->Add(txt_info[ctrl_cnt], 0, wxALIGN_LEFT|wxALL, 5); + + ++ctrl_cnt; + } + /* for (size_t i=0; i& merged_field_names, ++ctrl_cnt; } + */ // buttons wxStaticText* txt_dummy = new wxStaticText(this, wxID_ANY, ""); diff --git a/Explore/LineChartView.cpp b/Explore/LineChartView.cpp index ffc04a9ba..6ebbf50c5 100644 --- a/Explore/LineChartView.cpp +++ b/Explore/LineChartView.cpp @@ -2067,7 +2067,7 @@ void LineChartFrame::UpdateStatsWinContent(int var) s<< ""; s<< ""; - s<< ""; + s<< ""; s<< ""; s<< ""; s<< ""; @@ -2163,7 +2163,7 @@ void LineChartFrame::UpdateStatsWinContent(int var) s<< ""; stringstream _s; if (choice_groups->GetSelection() == 0) - _s << (int)lcs.deg_free; + _s << (int)lcs.deg_free -1; else _s << (int)(lcs.deg_free * 2); diff --git a/Explore/LisaMapNewView.cpp b/Explore/LisaMapNewView.cpp index 66b86bc61..c5ee294fb 100644 --- a/Explore/LisaMapNewView.cpp +++ b/Explore/LisaMapNewView.cpp @@ -647,14 +647,14 @@ void LisaMapFrame::OnSaveLisa(wxCommandEvent& event) } data[2].d_val = &sig; - data[2].label = "Significances"; + data[2].label = "Significance"; data[2].field_default = "LISA_P"; data[2].type = GdaConst::double_type; if (lc->is_diff) { data[3].d_val = &diff; data[3].label = "Diff Values"; - data[3].field_default = "DIFF_VAL"; + data[3].field_default = "DIFF_VAL2"; data[3].type = GdaConst::double_type; } diff --git a/GdaConst.cpp b/GdaConst.cpp index 7c3a2f58e..0d2bd41bc 100644 --- a/GdaConst.cpp +++ b/GdaConst.cpp @@ -303,7 +303,7 @@ const wxColour GdaConst::pcp_line_color(128, 0, 64); // dark cherry const wxColour GdaConst::pcp_horiz_line_color(0, 98, 0); // dark green // Averages Chart -const wxSize GdaConst::line_chart_default_size(720, 580); +const wxSize GdaConst::line_chart_default_size(760, 580); // colors defined in init() wxColour GdaConst::ln_cht_clr_regimes_hl; diff --git a/ShapeOperations/OGRDataAdapter.cpp b/ShapeOperations/OGRDataAdapter.cpp index b142b5e44..2f66b092d 100644 --- a/ShapeOperations/OGRDataAdapter.cpp +++ b/ShapeOperations/OGRDataAdapter.cpp @@ -307,15 +307,26 @@ OGRDataAdapter::ExportDataSource(string o_ds_format, int time_steps = table->GetTimeSteps(); for ( int id=0; id < table->GetNumberCols(); id++ ) { - for ( int t=0; t < time_steps; t++ ) { - wxString fname = table->GetColName(id, t); + if (table->IsColTimeVariant(id)) { + for ( int t=0; t < time_steps; t++ ) { + wxString fname = table->GetColName(id, t); + if (fname.IsEmpty()) { + wxString msg; + msg << "Field name is empty at position: " << id << " and time " << t; + throw GdaException(msg.mb_str(), GdaException::FIELD_NAME_EMPTY); + } + all_fnames.push_back(fname); + field_dict[fname] = make_pair(id, t); + } + } else { + wxString fname = table->GetColName(id); if (fname.IsEmpty()) { wxString msg; - msg << "Field name is empty at position: " << id << " and time " << t; + msg << "Field name is empty at position: " << id ; throw GdaException(msg.mb_str(), GdaException::FIELD_NAME_EMPTY); } all_fnames.push_back(fname); - field_dict[fname] = make_pair(id, t); + field_dict[fname] = make_pair(id, 0); } } diff --git a/version.h b/version.h index 860d830bb..724c9c5e6 100644 --- a/version.h +++ b/version.h @@ -2,10 +2,10 @@ namespace Gda { const int version_major = 1; const int version_minor = 8; const int version_build = 7; - const int version_subbuild = 0; + const int version_subbuild = 3; const int version_year = 2016; const int version_month = 5; - const int version_day = 8; + const int version_day = 20; const int version_night = 0; const int version_type = 1; // 0: alpha, 1: beta, 2: release }
GroupGroup Obs.  Mean  S.D. D.F.