fix issue#22

Так же исправление падения при открытии инструмента запросов из командной строки.
This commit is contained in:
lsv 2022-03-04 12:28:15 +05:00
parent 7ab2780404
commit 65eef54d6a
2 changed files with 3 additions and 0 deletions

View file

@ -2414,6 +2414,7 @@ int frmQuery::GetLineEndingStyle()
void frmQuery::OnAutoEditObject(wxCommandEvent &event)
{
if (!mainForm) return;
//parent->SetCurrentNode(parent->GetBrowser()->GetRootItem(), path);
pgObject *obj = mainForm->GetBrowser()->GetObject(mainForm->GetBrowser()->GetSelection());
pgFunction *fun=(pgFunction *)obj;//obj->Show
@ -4253,6 +4254,7 @@ void frmQuery::OnSqlBookPageChanged(wxAuiNotebookEvent &event)
sqlQuery->SetFocus();
if (sqlQueryBook->GetPageCount() > 1) fileMarkerActive(true, sqlQueryBook->GetPageText(sqlQueryBook->GetSelection()));
//wxMessageBox(wxT("OnSqlBookPageChanged "));
updateMenu(false);
wxTheApp->Yield(true);
}
}

View file

@ -778,6 +778,7 @@ bool pgAdmin3::OnInit()
{
wxLogInfo(wxT("Auto-loading file: %s"), fn.c_str());
}
SetTopWindow(NULL);
frmQuery *fq = new frmQuery(NULL, wxEmptyString, conn, wxEmptyString, fn);
fq->Go();
}