Bug #211 Tag-completion remains on-top when XML-Copy-Editor looses focus

This commit is contained in:
Zane U. Ji 2014-08-08 23:26:52 +08:00
parent 80999d32f9
commit 89be46ab2f
2 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,7 @@ BEGIN_EVENT_TABLE ( XmlCtrl, wxStyledTextCtrl )
EVT_MIDDLE_DOWN ( XmlCtrl::OnMiddleDown )
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_VALIDATION_COMPLETED, XmlCtrl::OnValidationCompleted)
EVT_NOTIFY ( myEVT_NOTIFY_PROMPT_GENERATED, wxID_ANY, XmlCtrl::OnPromptGenerated )
EVT_KILL_FOCUS ( XmlCtrl::OnKillFocus )
END_EVENT_TABLE()
// global protection for validation threads
@ -2396,3 +2397,9 @@ wxString XmlCtrl::getCurrentXPath()
return xpath;
}
void XmlCtrl::OnKillFocus ( wxFocusEvent &event )
{
AutoCompCancel();
event.Skip();
}

View File

@ -209,6 +209,7 @@ class XmlCtrl: public wxStyledTextCtrl
void OnMouseRightUp ( wxMouseEvent& event );
void OnMiddleDown ( wxMouseEvent& event );
void OnPromptGenerated ( wxNotifyEvent &event );
void OnKillFocus ( wxFocusEvent &event );
void insertNewLine();
void adjustNoColumnWidth();
void adjustPosRight();