bug fix and slow working

This commit is contained in:
levinsv 2019-01-26 18:29:36 +05:00
parent 7d7dbf3806
commit dfa337816c
7 changed files with 22 additions and 3 deletions

View file

@ -53,3 +53,11 @@ This text Russian language.
- построении плана с замерами в заголовках строк указывается процент времени выполнения узла (только операции узла но не вложенных узлов)
-
11.01.2019
- исправлены падения приложения при открытии таблицы по нажатию F4
26.01.2019
- исправлены падения приложения при вводе ( в окне редактирования кода)
- ускорено открытие диалога "новая функция", "новая таблицы".

Binary file not shown.

View file

@ -67,6 +67,7 @@ int ctlComboBoxFix::FillOidKey(pgConn *conn, const wxChar *qry)
{
int cnt = 0;
pgSetIterator set(conn->ExecuteSet(qry));
Freeze();
while (set.RowsLeft())
{
OID oid = set.GetOid(0);
@ -74,6 +75,7 @@ int ctlComboBoxFix::FillOidKey(pgConn *conn, const wxChar *qry)
Append(txt, oid);
cnt++;
}
Thaw();
return cnt;
}

View file

@ -95,7 +95,7 @@ void ctlSQLBox::Create(wxWindow *parent, wxWindowID id, const wxPoint &pos, cons
// Clear all styles
StyleClearAll();
m_name=NULL;
// Font
extern sysSettings *settings;
wxFont fntSQLBox = settings->GetSQLFont();
@ -456,7 +456,9 @@ bool ctlSQLBox::DoFind(const wxString &find, const wxString &replace, bool doRep
return false;
}
void ctlSQLBox::SetAutoReplaceList(queryMacroList *autorep) {
autoreplace=autorep;
if (!autorep) {
autoreplace = queryMacroFileProvider::LoadAutoReplace(true);
} else autoreplace=autorep;
}
void ctlSQLBox::SetDefFunction(wxArrayString &name, wxArrayString &def) {
m_name=&name;

View file

@ -270,12 +270,14 @@ int dlgColumn::Go(bool modal)
wxT(" ORDER BY nspname, collname"));
if (set)
{
cbCollation->Freeze();
while (!set->Eof())
{
wxString name = qtIdent(set->GetVal(wxT("nspname"))) + wxT(".") + qtIdent(set->GetVal(wxT("collname")));
cbCollation->Append(name);
set->MoveNext();
}
cbCollation->Thaw();
delete set;
}
cbCollation->SetSelection(0);

View file

@ -418,6 +418,8 @@ int dlgFunction::Go(bool modal)
restrict += wxT(" AND nspname NOT LIKE E'pg\\\\_toast%' AND nspname NOT LIKE E'pg\\\\_temp%'");
DatatypeReader tr(database, restrict);
cbDatatype->Freeze();
cbReturntype->Freeze();
while (tr.HasMore())
{
pgDatatype dt = tr.GetDatatype();
@ -430,7 +432,8 @@ int dlgFunction::Go(bool modal)
cbReturntype->Append(dt.GetQuotedSchemaPrefix(database) + dt.QuotedFullName());
tr.MoveNext();
}
cbDatatype->Thaw();
cbReturntype->Thaw();
long sel;
if (factory == &triggerFunctionFactory)
{

View file

@ -492,6 +492,7 @@ int dlgTable::Go(bool modal)
wxT(" ORDER BY relnamespace, c.relname"));
if (set)
{
cbTables->Freeze();
while (!set->Eof())
{
cbTables->Append(database->GetQuotedSchemaPrefix(set->GetVal(wxT("nspname")))
@ -500,6 +501,7 @@ int dlgTable::Go(bool modal)
tableOids.Add(set->GetVal(wxT("oid")));
set->MoveNext();
}
cbTables->Thaw();
delete set;
}
}