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

[XaraXtreme-commits] Commit Complete



Commit by  : phil
Repository : xara
Revision   : 1259
Date       : Tue Jun  6 12:51:12 BST 2006

Changed paths:
   M /Trunk/XaraLX/Kernel/hittest.cpp

Bug fix to prevent hit-testing leaving one spread subtree and entering another.


Diff:
Index: Trunk/XaraLX/Kernel/hittest.cpp
===================================================================
--- Trunk/XaraLX/Kernel/hittest.cpp	(revision 1258)
+++ Trunk/XaraLX/Kernel/hittest.cpp	(revision 1259)
@@ -1189,14 +1189,20 @@
 		// search can be terminated.
 		do
 		{
-			if (pNode->IsSpread()) return 0;
+			if (pNode->IsSpread())		// Don't allow hit-testing to cross spreads
+				return NULL;
+
 			pNode = pNode->FindParent();
 		}
 		while (pNode != 0 && pNode->FindPrevious() == 0);
+		if (pNode->IsSpread())			// Don't allow hit-testing to cross spreads
+			return NULL;
 
 		// If we broke out of the above loop because we found a parent with a previous
 		// sibling then advance to that sibling.
 		if (pNode != 0 && pNode->FindPrevious() != 0) pNode = pNode->FindPrevious();
+		if (pNode->IsSpread())			// Don't allow hit-testing to cross spreads
+			return NULL;
 	}
 
 	// If the found node is an attribute then remove it from the attribute map because it


Xara