dfgh
This commit is contained in:
@@ -335,9 +335,10 @@ Public Class PaintingControl
|
|||||||
Dim sp As PointF = savedPos(obj)
|
Dim sp As PointF = savedPos(obj)
|
||||||
|
|
||||||
If Not movedObjs.Contains(obj) Then
|
If Not movedObjs.Contains(obj) Then
|
||||||
UpdateObjectPosition(e, obj, sp)
|
If UpdateObjectPosition(e, obj, sp) Then
|
||||||
movedObjs.Add(obj)
|
movedObjs.Add(obj)
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If obj.PinnedObjects.Count > 0 Then
|
If obj.PinnedObjects.Count > 0 Then
|
||||||
UpdateObjectPositions(e, obj.PinnedObjects, movedObjs)
|
UpdateObjectPositions(e, obj.PinnedObjects, movedObjs)
|
||||||
@@ -348,7 +349,8 @@ Public Class PaintingControl
|
|||||||
ResumeDrawing(False)
|
ResumeDrawing(False)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub UpdateObjectPosition(e As MouseEventArgs, obj As PaintingObject, sp As PointF)
|
Private Function UpdateObjectPosition(e As MouseEventArgs, obj As PaintingObject, sp As PointF) As Boolean
|
||||||
|
Dim moved As Boolean = False
|
||||||
Dim cancel As New CancelEventArgs(False)
|
Dim cancel As New CancelEventArgs(False)
|
||||||
obj.RaiseMovingBeforePositionUpdated(cancel)
|
obj.RaiseMovingBeforePositionUpdated(cancel)
|
||||||
|
|
||||||
@@ -356,8 +358,11 @@ Public Class PaintingControl
|
|||||||
obj.Location = New Point(e.X - sp.X + Offset.X,
|
obj.Location = New Point(e.X - sp.X + Offset.X,
|
||||||
e.Y - sp.Y + Offset.Y)
|
e.Y - sp.Y + Offset.Y)
|
||||||
obj.RaiseMoving(New EventArgs)
|
obj.RaiseMoving(New EventArgs)
|
||||||
|
moved = True
|
||||||
End If
|
End If
|
||||||
End Sub
|
|
||||||
|
Return moved
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function IsResizingObjs(objs As IList(Of PaintingObject)) As Boolean
|
Private Function IsResizingObjs(objs As IList(Of PaintingObject)) As Boolean
|
||||||
For Each obj As PaintingObject In objs
|
For Each obj As PaintingObject In objs
|
||||||
|
|||||||
Reference in New Issue
Block a user