mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
buf fix sort and procedure
This commit is contained in:
parent
ae8ca667e7
commit
9b97fa1dcf
7 changed files with 26 additions and 7 deletions
|
|
@ -108,6 +108,10 @@ This text Russian language.
|
|||
- добавлены новые опции для Vaccum ( DISABLE_PAGE_SKIPPING ) и Reindex ( CONCURRENTLY )
|
||||
* ускорена работа фильтра в окне результав запроса.
|
||||
|
||||
13.04.2020
|
||||
* исправлено падение в режиме редактирования
|
||||
* исправлено редактирование процедур без аргументов
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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()) )
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -927,7 +927,7 @@ wxString dlgFunction::GetSql()
|
|||
{
|
||||
if (isProcedure && GetArgs().IsEmpty())
|
||||
{
|
||||
sql += schema->GetQuotedPrefix() + qtIdent(GetName());
|
||||
sql += schema->GetQuotedPrefix() + qtIdent(GetName()) + wxT("()");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -458,8 +458,8 @@ wxString pgProcedure::GetSql(ctlTree *browser)
|
|||
|
||||
if (GetArgListWithNames().IsEmpty())
|
||||
{
|
||||
qtName = GetQuotedFullIdentifier();
|
||||
qtSig = GetQuotedFullIdentifier();
|
||||
qtName = GetQuotedFullIdentifier()+wxT("()");
|
||||
qtSig = GetQuotedFullIdentifier()+wxT("()");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue