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

[XaraXtreme-commits] Commit Complete



Commit by  : luke
Repository : xara
Revision   : 1179
Date       : Tue May 23 17:56:31 BST 2006

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

Don't set the cursor when we don't have a RenderWnd to give it scope (fixes BZ #1100)


Diff:
Index: Trunk/XaraLX/wxOil/cursor.cpp
===================================================================
--- Trunk/XaraLX/wxOil/cursor.cpp	(revision 1178)
+++ Trunk/XaraLX/wxOil/cursor.cpp	(revision 1179)
@@ -578,11 +578,13 @@
 	if (pCaptureWnd)
 		pCaptureWnd->ReleaseMouse();
 
-	// Set the global cursor
-	wxSetCursor(hCursor);
+	// Set the global cursor (but only if we have a Render window to
+	// control its scope)
+	wxWindow* pRenderWnd = DocView::GetCurrentRenderWindow();
+	if( NULL != pRenderWnd )
+		wxSetCursor(hCursor);
 
 	// If we have a RenderWindow and it doesn't have the capture then set its cursor
-	wxWindow* pRenderWnd = DocView::GetCurrentRenderWindow();
 	if( pRenderWnd != NULL && pCaptureWnd != pRenderWnd)
 		pRenderWnd->SetCursor(hCursor);
 


Xara