Author: alanmc
Date: 2007-06-29 14:00:16 -0400 (Fri, 29 Jun 2007)
New Revision: 81055

Modified:
   trunk/lunareclipse/ChangeLog
   trunk/lunareclipse/Model/Draw/SelectionDraw.cs
Log:
* Model/Draw/SelectionDraw.cs: Selection code now handles the case
  where you click on an item and drag it without previously selecting
  it

Modified: trunk/lunareclipse/ChangeLog
===================================================================
--- trunk/lunareclipse/ChangeLog        2007-06-29 17:57:59 UTC (rev 81054)
+++ trunk/lunareclipse/ChangeLog        2007-06-29 18:00:16 UTC (rev 81055)
@@ -1,5 +1,11 @@
 2007-06-29  Alan McGovern <[EMAIL PROTECTED]> 
 
+       * Model/Draw/SelectionDraw.cs: Selection code now handles the case
+         where you click on an item and drag it without previously selecting
+         it
+
+2007-06-29  Alan McGovern <[EMAIL PROTECTED]> 
+
        Made selected objects accessible
 
 2007-06-29  Alan McGovern <[EMAIL PROTECTED]> 

Modified: trunk/lunareclipse/Model/Draw/SelectionDraw.cs
===================================================================
--- trunk/lunareclipse/Model/Draw/SelectionDraw.cs      2007-06-29 17:57:59 UTC 
(rev 81054)
+++ trunk/lunareclipse/Model/Draw/SelectionDraw.cs      2007-06-29 18:00:16 UTC 
(rev 81055)
@@ -130,13 +130,21 @@
         {
             Point mousePoint = e.GetPosition(Panel);
             mousePoint.Offset(-Position.X, -Position.Y);
+            
             base.Resize(e);
 
             if(this.clickedOnShape)
             {
-                Console.WriteLine("Moving");
+                if(selectedObjects.Count == 0)
+                {
+                    Shape s;
+                    ClickedOnShape(mouseStart, out s);
+                    selectedObjects.Add(s);
+                }
+                
                 foreach(Shape s in this.selectedObjects)
                     MoveShape(s, mousePoint);
+                
                 Element.Width = 0;
                 Element.Height = 0;
             }
@@ -159,6 +167,7 @@
             Point mouseLocation = e.GetPosition(Panel);
             bool clickedOnShape = ClickedOnShape(mouseLocation, out shape);
             bool mouseDidntMove = mouseStart.Equals(Position);
+            
             if(clickedOnShape && mouseDidntMove)
             {
                 if(!e.Ctrl && !e.Shift)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to