From ba33a706050f3a39142ccf13fda384fff6bb4a44 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Mon, 9 May 2016 10:38:47 -0700 Subject: [PATCH 1/9] #428 update behaves incorrectly for testing release --- DialogTools/AutoUpdateDlg.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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 ""; From 651dfc7a657c0d975ce91b7a13caa4deb521b18c Mon Sep 17 00:00:00 2001 From: Xun Li Date: Mon, 9 May 2016 10:40:46 -0700 Subject: [PATCH 2/9] update version to 1.8.7.1 --- version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version.h b/version.h index 860d830bb..8e2bdf1ae 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 = 1; const int version_year = 2016; const int version_month = 5; - const int version_day = 8; + const int version_day = 9; const int version_night = 0; const int version_type = 1; // 0: alpha, 1: beta, 2: release } From d3bb9ade5dca76cb9c8cbdb0a9713f60693fedb6 Mon Sep 17 00:00:00 2001 From: lixun910 Date: Mon, 9 May 2016 12:03:30 -0700 Subject: [PATCH 3/9] update build script ubuntu --- BuildTools/ubuntu/GNUmakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BuildTools/ubuntu/GNUmakefile b/BuildTools/ubuntu/GNUmakefile index 150ef6809..72bea63cf 100644 --- a/BuildTools/ubuntu/GNUmakefile +++ b/BuildTools/ubuntu/GNUmakefile @@ -72,7 +72,7 @@ build-geoda-mac: cp $(GEODA_HOME)/libraries/lib/libproj.so.0.7.0 build/plugins/libproj.so.0 cp $(GEODA_HOME)/libraries/lib/libgeos_c.so.1.7.8 build/plugins/libgeos_c.so.1 cp $(GEODA_HOME)/libraries/lib/libsqlite3.so.0.8.6 build/plugins/libsqlite3.so.0 - cp $(GEODA_HOME)/libraries/lib/libiconv.so.2.5.0 build/plugins/libiconv.so.2 + cp $(GEODA_HOME)/libraries/lib/libiconv.so.2.5.1 build/plugins/libiconv.so.2 chmod +x build/plugins/libiconv.so.2 cp $(GEODA_HOME)/libraries/lib/libminizip.so.0.0.0 build/plugins/libminizip.so.0 cp $(GEODA_HOME)/libraries/lib/liburiparser.so.1.0.5 build/plugins/liburiparser.so.1 From b0a0f51bb6752653c0bcb3770ce3cf61fdd924a5 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 20 May 2016 11:29:45 -0700 Subject: [PATCH 4/9] issue #406 DIFF_VAL-> DIFF_VAL2 in LISA;Significances->Significance. --- Explore/LisaMapNewView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } From 9184f3cdcb298f96dc8b5f15e069230bff708d54 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 20 May 2016 11:42:56 -0700 Subject: [PATCH 5/9] #411: windows averages chart: interface formatting issue --- Explore/LineChartView.cpp | 2 +- GdaConst.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Explore/LineChartView.cpp b/Explore/LineChartView.cpp index ffc04a9ba..c5008f4d2 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<< ""; 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; From 44302b66ce291f8c17d6021400acf08b18d9ed60 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 20 May 2016 11:54:54 -0700 Subject: [PATCH 6/9] #419 correct d.f. for DID test (select vs unselect) --- Explore/LineChartView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Explore/LineChartView.cpp b/Explore/LineChartView.cpp index c5008f4d2..6ebbf50c5 100644 --- a/Explore/LineChartView.cpp +++ b/Explore/LineChartView.cpp @@ -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); From 7f8257756cbb34dbd0906b6b2450eac16609228f Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 20 May 2016 13:05:36 -0700 Subject: [PATCH 7/9] #429 save as crash --- DialogTools/FieldNameCorrectionDlg.cpp | 52 +++++++++++++++++++++++++- ShapeOperations/OGRDataAdapter.cpp | 19 ++++++++-- 2 files changed, 65 insertions(+), 6 deletions(-) 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/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); } } From 185ec1243389a58197fbc4ad57ded3b99ef45035 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 20 May 2016 13:07:56 -0700 Subject: [PATCH 8/9] update version --- version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.h b/version.h index 8e2bdf1ae..943379f88 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ namespace Gda { const int version_major = 1; const int version_minor = 8; const int version_build = 7; - const int version_subbuild = 1; + const int version_subbuild = 3; const int version_year = 2016; const int version_month = 5; const int version_day = 9; From 5812062f0c84b9751e1f2188c6dd1b881f160c97 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Fri, 20 May 2016 13:55:31 -0700 Subject: [PATCH 9/9] update new version date --- version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.h b/version.h index 943379f88..724c9c5e6 100644 --- a/version.h +++ b/version.h @@ -5,7 +5,7 @@ namespace Gda { const int version_subbuild = 3; const int version_year = 2016; const int version_month = 5; - const int version_day = 9; + 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.