Index: frmQuery.cpp =================================================================== --- frmQuery.cpp (revision 5791) +++ frmQuery.cpp (working copy) @@ -62,7 +62,6 @@ BEGIN_EVENT_TABLE(frmQuery, pgFrame) EVT_ERASE_BACKGROUND( frmQuery::OnEraseBackground) EVT_SIZE( frmQuery::OnSize) - EVT_COMBOBOX(CTRLID_CONNECTION, frmQuery::OnChangeConnection) EVT_CLOSE( frmQuery::OnClose) EVT_SET_FOCUS( frmQuery::OnSetFocus) EVT_MENU(MNU_NEW, frmQuery::OnNew) @@ -280,6 +279,7 @@ outputPane->AddPage(msgResult, _("Messages")); outputPane->AddPage(msgHistory, _("History")); + this->Connect(CTRLID_CONNECTION, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler(frmQuery::OnChangeConnection)); sqlQuery->Connect(wxID_ANY, wxEVT_SET_FOCUS,wxFocusEventHandler(frmQuery::OnFocus)); sqlResult->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus)); msgResult->Connect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus)); @@ -369,6 +369,7 @@ sqlResult->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus)); msgResult->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus)); msgHistory->Disconnect(wxID_ANY, wxEVT_SET_FOCUS, wxFocusEventHandler(frmQuery::OnFocus)); + this->Disconnect(CTRLID_CONNECTION, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler(frmQuery::OnChangeConnection)); if (mainForm) mainForm->RemoveFrame(this); @@ -632,10 +633,6 @@ void frmQuery::OnChangeConnection(wxCommandEvent &ev) { - // On Solaris, this event seems to get fired when the form closes(!!) - if(!IsVisible()) - return; - unsigned int sel=cbConnection->GetCurrentSelection(); if (sel == cbConnection->GetCount()-1) {