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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1709
Date       : Fri Aug 18 15:28:55 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/cursor.cpp

Fix BZ #1334, treat wxCamDrawControl's like the render window in cursor code. This allows them to have custom cusors, when cursor moves out of control it will automatically revert


Diff:
Index: Trunk/XaraLX/wxOil/cursor.cpp
===================================================================
--- Trunk/XaraLX/wxOil/cursor.cpp	(revision 1708)
+++ Trunk/XaraLX/wxOil/cursor.cpp	(revision 1709)
@@ -114,6 +114,7 @@
 #include "cartprov.h"
 //#include "docview.h" - in camtypes.h [AUTOMATICALLY REMOVED]
 #include "camframe.h"
+#include "drawctl.h"
 
 //#include "hotlink.h"  //For the pointing hand cursor
 
@@ -583,9 +584,11 @@
 	// this stops the cursor being hijacked when we pop.
 	wxWindow*	pRenderWnd = DocView::GetCurrentRenderWindow();
 	wxPoint		ptDontCare;
+	wxWindow*	pWndAtPtr  = wxFindWindowAtPointer( ptDontCare );
 	if( NULL != pRenderWnd )
 	{
-		if( !fOnlyRendWnd || wxFindWindowAtPointer( ptDontCare ) == pRenderWnd )
+		bool	fDrawCtrl = NULL != pWndAtPtr ? pWndAtPtr->IsKindOf( CLASSINFO(wxCamDrawControl) ) : false;
+		if( !fOnlyRendWnd || fDrawCtrl || pWndAtPtr == pRenderWnd )
 			wxSetCursor(hCursor);
 		else
 			wxSetCursor( *wxSTANDARD_CURSOR );


Xara