Update of /cvsroot/simspark/simspark/contrib/rsgedit
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29520
Modified Files:
Tag: RSGEDIT_SCINTILLA
mainframe.cpp mainframe.h
Log Message:
- make sure that the OpenGL canvas receives the input focus if when its tab is selected
Index: mainframe.h
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v
retrieving revision 1.15.2.4
retrieving revision 1.15.2.5
diff -C2 -d -r1.15.2.4 -r1.15.2.5
*** mainframe.h 23 Jun 2007 09:24:06 -0000 1.15.2.4
--- mainframe.h 23 Jun 2007 09:32:51 -0000 1.15.2.5
***************
*** 155,158 ****
--- 155,159 ----
void OnTabClosing(wxFlatNotebookEvent& event);
+ void OnTabChanged(wxFlatNotebookEvent& event);
void OnEditSavePointReached(wxScintillaEvent& event);
Index: mainframe.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v
retrieving revision 1.21.2.9
retrieving revision 1.21.2.10
diff -C2 -d -r1.21.2.9 -r1.21.2.10
*** mainframe.cpp 23 Jun 2007 09:28:05 -0000 1.21.2.9
--- mainframe.cpp 23 Jun 2007 09:32:51 -0000 1.21.2.10
***************
*** 108,111 ****
--- 108,112 ----
EVT_FLATNOTEBOOK_PAGE_CLOSING(wxID_ANY, mainframe::OnTabClosing)
+ EVT_FLATNOTEBOOK_PAGE_CHANGED(wxID_ANY, mainframe::OnTabChanged)
EVT_SCI_SAVEPOINTREACHED(wxID_ANY, mainframe::OnEditSavePointReached)
***************
*** 1145,1148 ****
--- 1146,1160 ----
}
+ void mainframe::OnTabChanged(wxFlatNotebookEvent& event)
+ {
+ wxWindow* page = mCtrNotebook->GetPage(event.GetSelection());
+ if (page == mCanvas)
+ {
+ mCanvas->SetFocus();
+ }
+
+ event.Skip();
+ }
+
void mainframe::OnEditSavePointReached(wxScintillaEvent& event)
{
|