diff --git a/README.md b/README.md index fb30381..b19c70b 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,10 @@ This text Russian language. - добавлены новые опции для Vaccum ( DISABLE_PAGE_SKIPPING ) и Reindex ( CONCURRENTLY ) * ускорена работа фильтра в окне результав запроса. +13.04.2020 + * исправлено падение в режиме редактирования + * исправлено редактирование процедур без аргументов + diff --git a/Release_(3.0)/pgAdmin3.exe b/Release_(3.0)/pgAdmin3.exe index 00505fe..c6a1d29 100644 Binary files a/Release_(3.0)/pgAdmin3.exe and b/Release_(3.0)/pgAdmin3.exe differ diff --git a/ctl/ctlSQLGrid.cpp b/ctl/ctlSQLGrid.cpp index e768847..d2338f1 100644 --- a/ctl/ctlSQLGrid.cpp +++ b/ctl/ctlSQLGrid.cpp @@ -59,7 +59,7 @@ ctlSQLGrid::ctlSQLGrid(wxWindow *parent, wxWindowID id, const wxPoint &pos, cons //SetUseNativeColLabels(true); //UseNativeColHeader(true); grp=NULL; - + isSort=false; Connect(wxID_ANY, wxEVT_GRID_LABEL_LEFT_DCLICK, wxGridEventHandler(ctlSQLGrid::OnLabelDoubleClick)); } #include "wx/renderer.h" @@ -67,6 +67,7 @@ ctlSQLGrid::ctlSQLGrid(wxWindow *parent, wxWindowID id, const wxPoint &pos, cons void ctlSQLGrid::DrawColLabel( wxDC& dc, int col ) { wxGrid::DrawColLabel(dc,col); + if (!IsSort()) return; int colLeft = GetColLeft(col); wxRect rect(colLeft, 0, GetColWidth(col), m_colLabelHeight); @@ -516,9 +517,11 @@ void ctlSQLGrid::OnLabelClick(wxGridEvent &event) if ( col >= 0 && (event.AltDown() ) ) { // continue for sort event - sqlResultTable *t=(sqlResultTable *)GetTable(); - t->setSortColumn(col); - return; + if (IsSort()) { + sqlResultTable *t=(sqlResultTable *)GetTable(); + t->setSortColumn(col); + return; + } } // add support for (de)selecting multiple rows and cols with Control pressed else if ( row >= 0 && (event.ControlDown() || event.CmdDown()) ) diff --git a/ctl/ctlSQLResult.cpp b/ctl/ctlSQLResult.cpp index 8a11058..f32aa5c 100644 --- a/ctl/ctlSQLResult.cpp +++ b/ctl/ctlSQLResult.cpp @@ -194,6 +194,7 @@ void ctlSQLResult::DisplayData(bool single) ProcessTableMessage(*msg); delete msg; table->initSort(); + SetSort(true); if (NumRows()<1000) { for(int row = 0; row < NumRows(); ++row) { if (row%2==0) { @@ -679,6 +680,7 @@ sqlResultTable::sqlResultTable() thread = NULL; colorder=NULL; maplines=NULL; + use_map=false; } int sqlResultTable::GetNumberRows() diff --git a/dlg/dlgFunction.cpp b/dlg/dlgFunction.cpp index be97289..ae359e7 100644 --- a/dlg/dlgFunction.cpp +++ b/dlg/dlgFunction.cpp @@ -927,7 +927,7 @@ wxString dlgFunction::GetSql() { if (isProcedure && GetArgs().IsEmpty()) { - sql += schema->GetQuotedPrefix() + qtIdent(GetName()); + sql += schema->GetQuotedPrefix() + qtIdent(GetName()) + wxT("()"); } else { diff --git a/include/ctl/ctlSQLGrid.h b/include/ctl/ctlSQLGrid.h index 16fc853..d60c8fb 100644 --- a/include/ctl/ctlSQLGrid.h +++ b/include/ctl/ctlSQLGrid.h @@ -36,6 +36,15 @@ public: { return true; }; + bool IsSort() + { + return isSort; + }; + void SetSort(bool flag) + { + isSort=flag; + }; + wxSize GetBestSize(int row, int col); void OnLabelDoubleClick(wxGridEvent &event); void OnLabelClick(wxGridEvent &event); @@ -65,6 +74,7 @@ private: ColKeySizeHashMap colSizes; // Max size for each column wxArrayInt colMaxSizes; + bool isSort; }; diff --git a/schema/pgFunction.cpp b/schema/pgFunction.cpp index 10d231f..80b503e 100644 --- a/schema/pgFunction.cpp +++ b/schema/pgFunction.cpp @@ -458,8 +458,8 @@ wxString pgProcedure::GetSql(ctlTree *browser) if (GetArgListWithNames().IsEmpty()) { - qtName = GetQuotedFullIdentifier(); - qtSig = GetQuotedFullIdentifier(); + qtName = GetQuotedFullIdentifier()+wxT("()"); + qtSig = GetQuotedFullIdentifier()+wxT("()"); } else {