From 65eef54d6a65bcb4882a82090e2c6e0439f559d3 Mon Sep 17 00:00:00 2001 From: lsv Date: Fri, 4 Mar 2022 12:28:15 +0500 Subject: [PATCH] fix issue#22 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Так же исправление падения при открытии инструмента запросов из командной строки. --- frm/frmQuery.cpp | 2 ++ pgAdmin3.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/frm/frmQuery.cpp b/frm/frmQuery.cpp index 213f22e..e41ea76 100644 --- a/frm/frmQuery.cpp +++ b/frm/frmQuery.cpp @@ -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); } } diff --git a/pgAdmin3.cpp b/pgAdmin3.cpp index c36edf6..1dfd462 100644 --- a/pgAdmin3.cpp +++ b/pgAdmin3.cpp @@ -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(); }