[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1608
Date       : Sat Jul 29 21:34:09 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/stdbars.cpp
   M /Trunk/XaraLX/wxOil/dlgmgr.cpp

Fixed focus problem I introduced by trying to fix bar focus return code too quickly. Now fixed properly (moved to dlgmgr.cpp).


Diff:
Index: Trunk/XaraLX/Kernel/stdbars.cpp
===================================================================
--- Trunk/XaraLX/Kernel/stdbars.cpp	(revision 1607)
+++ Trunk/XaraLX/Kernel/stdbars.cpp	(revision 1608)
@@ -257,13 +257,6 @@
 			End();
 			return OK;
 		}
-
-		// Else fall through
-		if (( DIM_SELECTION_CHANGED == DMsg->DlgMsg ) || ( DIM_SLIDER_POS_SET == DMsg->DlgMsg ))
-		{
-			TRACEUSER( "luke", _T("Change focus") );
-			AfxGetApp().GiveActiveCanvasFocus();
-		}
 	}
 	
 	return DialogOp::Message(Msg);
Index: Trunk/XaraLX/wxOil/dlgmgr.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 1607)
+++ Trunk/XaraLX/wxOil/dlgmgr.cpp	(revision 1608)
@@ -1589,6 +1589,12 @@
 	// If we have a message to send, then send it (or defer it for later)
 	if (msg.DlgMsg != DIM_NONE)
 	{
+		// Restore focus after selection change etc. if the dialog Op is non-modal
+		if (!(pEvtHandler->pDialogOp->IsModal()) && (( DIM_SELECTION_CHANGED == msg.DlgMsg ) || ( DIM_SLIDER_POS_SET == msg.DlgMsg )))
+		{
+			TRACEUSER( "luke", _T("Change focus") );
+			AfxGetApp().GiveActiveCanvasFocus();
+		}
 
 		if (Defer)
 		{


Xara