Update of /cvsroot/mahogany/M/src/gui
In directory usw-pr-cvs1:/tmp/cvs-serv25374/src/gui
Modified Files:
wxDialogLayout.cpp
Log Message:
fix a strange focus problem under Windows
Index: wxDialogLayout.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxDialogLayout.cpp,v
retrieving revision 1.85
retrieving revision 1.86
diff -b -u -2 -r1.85 -r1.86
--- wxDialogLayout.cpp 16 Mar 2002 00:02:52 -0000 1.85
+++ wxDialogLayout.cpp 15 Jun 2002 22:18:03 -0000 1.86
@@ -1187,4 +1187,14 @@
bool wxOptionsEditDialog::TransferDataToWindow()
{
+#ifdef OS_WIN
+ // we have a problem under Windows: although initially the focus is set
+ // correctly in the dialog, when we call wxRadioBox::SetSelection from one
+ // of the pages TransferDataToWindow(), it is changed to the radio box which
+ // is wrong as it might go to a hidden page
+ //
+ // this should be somehow fixed in wxMSW but for now do it here
+ wxWindow *focusOld = FindFocus();
+#endif // OS_WIN
+
for ( int nPage = 0; nPage < m_notebook->GetPageCount(); nPage++ ) {
wxWindow *page = m_notebook->GetPage(nPage);
@@ -1193,4 +1203,9 @@
}
}
+
+#ifdef OS_WIN
+ if ( focusOld )
+ focusOld->SetFocus();
+#endif // OS_WIN
ResetDirty();
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -
http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates