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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1232
Date       : Wed May 31 23:36:07 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/ccolbar.cpp
   M /Trunk/XaraLX/wxOil/dragpick.cpp

Fix ink-dropper over colour line


Diff:
Index: Trunk/XaraLX/wxOil/ccolbar.cpp
===================================================================
--- Trunk/XaraLX/wxOil/ccolbar.cpp	(revision 1231)
+++ Trunk/XaraLX/wxOil/ccolbar.cpp	(revision 1232)
@@ -1296,7 +1296,7 @@
 		UINT32 ColourCell = WhereIsMouse (mousePt);
 		static UINT32 lastColourCell = (UINT32)-1;
 
-		if ((((INT32)ColourCell) >= 0) && (lastColourCell != ColourCell))		// we are over a valid colour
+		if ((((INT32)ColourCell) >= 0)/* && (lastColourCell != ColourCell)*/)		// we are over a valid colour
 		{
 			BOOL validColour = FALSE;
 			
@@ -1331,19 +1331,19 @@
 					validColour = TRUE;
 				}
 			}
+
+			if (validColour && pTheCol)
+				*pTheCol = TheColour;
 			
-			if ((lastColourCell != ColourCell) && (validColour == TRUE))
+			if ((lastColourCell != ColourCell) && validColour)
 			{
 				ColourEditDlg* pColourEditDlg = ColourEditDlg::GetColourEditDlg ();
 				ASSERT (pColourEditDlg);
 
 				pColourEditDlg->SetEditingColour (TheColour);
-				if (pTheCol)
-					*pTheCol = TheColour;
+				lastColourCell = ColourCell;
 			}
 			
-			lastColourCell = ColourCell;
-			
 			return (TRUE);
 		}
 		else
Index: Trunk/XaraLX/wxOil/dragpick.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dragpick.cpp	(revision 1231)
+++ Trunk/XaraLX/wxOil/dragpick.cpp	(revision 1232)
@@ -496,12 +496,7 @@
 					Temp.MakeRefToIndexedColour(pIndexedColour);
 					INT32 r, g, b;
 					Temp.GetRGBValue(&r, &g, &b);
-					ColourRGBT TheColourRGBT;
-					TheColourRGBT.Red = r;
-					TheColourRGBT.Green = g;
-					TheColourRGBT.Blue = b;
-					TheColourRGBT.Transparent = 0;
-					col = DOCCOLOUR_RGBT(&TheColourRGBT);
+					col = DocColour(r, g, b);
 				}
 				break;
 			}


Xara