don't bounce back events to the text control recursively as this results in infinite recursion under wxGTK and probably other ports
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -156,6 +156,12 @@ void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) )
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView)
|
||||
|
||||
BEGIN_EVENT_TABLE(TextEditView, wxView)
|
||||
EVT_MENU(wxID_COPY, TextEditView::OnCopy)
|
||||
EVT_MENU(wxID_PASTE, TextEditView::OnPaste)
|
||||
EVT_MENU(wxID_SELECTALL, TextEditView::OnSelectAll)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
bool TextEditView::OnCreate(wxDocument *doc, long WXUNUSED(flags) )
|
||||
{
|
||||
m_frame = wxGetApp().CreateChildFrame(doc, this, false);
|
||||
@@ -201,21 +207,6 @@ bool TextEditView::OnClose(bool deleteWindow)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TextEditView::ProcessEvent(wxEvent& event)
|
||||
{
|
||||
bool processed = false;
|
||||
if (!processed) switch (event.GetId())
|
||||
{
|
||||
case wxID_COPY:
|
||||
case wxID_PASTE:
|
||||
case wxID_SELECTALL:
|
||||
processed = m_textsw->ProcessEvent(event);
|
||||
break;
|
||||
}
|
||||
if (!processed) processed = wxView::ProcessEvent(event);
|
||||
return processed;
|
||||
}
|
||||
|
||||
/*
|
||||
* Window implementations
|
||||
*/
|
||||
|
Reference in New Issue
Block a user