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

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 916
Date       : Fri Apr 28 13:25:22 BST 2006

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

Thinko fix on rectangle size when there is no bitmap


Diff:
Index: Trunk/XaraLX/wxOil/dragbmp.cpp
===================================================================
--- Trunk/XaraLX/wxOil/dragbmp.cpp	(revision 915)
+++ Trunk/XaraLX/wxOil/dragbmp.cpp	(revision 916)
@@ -538,10 +538,10 @@
 			//the rectangle to draw into
 			wxRect DrawRect;
 
-			if(DragRect.x == 0 || DragRect.y == 0)
-				DrawRect = wxRect(Origin.x,Origin.y, Origin.x + NullSize, Origin.y + NullSize);
+			if(DragRect.GetWidth() == 0 || DragRect.GetHeight() == 0)
+				DrawRect = wxRect(Origin.x,Origin.y, NullSize, NullSize);
 			else
-				DrawRect = wxRect(Origin.x,Origin.y, Origin.x + DragRect.x, Origin.y + DragRect.y);
+				DrawRect = wxRect(Origin.x,Origin.y, DragRect.GetWidth(), DragRect.GetHeight());
 
 			// select brushes and pens ..
 			TheDC->SetBrush(*pDragBrush);
@@ -556,7 +556,10 @@
 
 			// draw a rectangle 			 		
 	 		TheDC->DrawRectangle(DrawRect);
-		    						
+
+			TheDC->SetBrush(*wxTRANSPARENT_BRUSH);
+			TheDC->SetPen(*wxTRANSPARENT_PEN);
+
 			delete pDragBrush;
 		}
 		else


Xara