[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]
[XaraXtreme-commits] Commit Complete
Commit by : luke
Repository : xara
Revision : 790
Date : Fri Apr 7 13:11:45 BST 2006
Changed paths:
M /Trunk/XaraLX/Kernel/stdbars.cpp
M /Trunk/XaraLX/wxOil/camelot.cpp
M /Trunk/XaraLX/wxOil/camelot.h
Selection of combo items or enter in textbox puts focus back to canvas (P1 fix)
Diff:
Index: Trunk/XaraLX/Kernel/stdbars.cpp
===================================================================
--- Trunk/XaraLX/Kernel/stdbars.cpp (revision 789)
+++ Trunk/XaraLX/Kernel/stdbars.cpp (revision 790)
@@ -98,6 +98,7 @@
#include "camtypes.h"
#include "ops.h"
+#include "camelot.h"
DECLARE_SOURCE("$Revision$");
@@ -243,9 +244,10 @@
return OK; // who knows what that is all about...
}
+ DialogMsg* DMsg = (DialogMsg*)Msg;
+
if (IS_OUR_DIALOG_MSG(Msg))
{
- DialogMsg* DMsg = (DialogMsg*)Msg;
// Handle ok button
if ((DMsg->DlgMsg == DIM_COMMIT) || (DMsg->DlgMsg == DIM_CANCEL))
{
@@ -256,6 +258,15 @@
}
// Else fall through
}
+ else
+ {
+ if( DIM_SELECTION_CHANGED == DMsg->DlgMsg )
+ {
+ TRACEUSER( "luke", _T("Change focus") );
+ AfxGetApp().GiveActiveCanvasFocus();
+ }
+ }
+
return DialogOp::Message(Msg);
}
Index: Trunk/XaraLX/wxOil/camelot.h
===================================================================
--- Trunk/XaraLX/wxOil/camelot.h (revision 789)
+++ Trunk/XaraLX/wxOil/camelot.h (revision 790)
@@ -138,6 +138,8 @@
void OnKeyEvent ( wxKeyEvent &event );
void OnChar ( wxKeyEvent &event );
+
+ void GiveActiveCanvasFocus();
protected:
std::auto_ptr<wxDocManager> m_docManager;
Index: Trunk/XaraLX/wxOil/camelot.cpp
===================================================================
--- Trunk/XaraLX/wxOil/camelot.cpp (revision 789)
+++ Trunk/XaraLX/wxOil/camelot.cpp (revision 790)
@@ -818,6 +818,12 @@
}
+void CCamApp::GiveActiveCanvasFocus()
+{
+ CCamView* pView = dynamic_cast<CCamView*>( m_docManager->GetCurrentView() );
+ pView->Activate( true );
+}
+
/***************************************************************************************************************************/
//
// The following is class is needed to ensure that the file menu is removed
Xara