.
This commit is contained in:
@@ -314,7 +314,7 @@ Public Class PaintingControl
|
||||
|
||||
Private Sub SaveObjectPositions(e As MouseEventArgs, objs As IList)
|
||||
For Each obj As PaintingObject In objs
|
||||
If Not savedPos.ContainsKey(obj) Then
|
||||
If Not obj.HardcodedLocation AndAlso Not savedPos.ContainsKey(obj) Then
|
||||
savedPos.Add(obj, New PointF(e.X - obj.Location.X + Offset.X, e.Y - obj.Location.Y + Offset.Y))
|
||||
SaveObjectPositions(e, obj.PinnedObjects)
|
||||
End If
|
||||
|
||||
@@ -42,7 +42,8 @@ Imports Newtonsoft.Json
|
||||
<JsonIgnore> Public Property BufferedImage As Image = Nothing
|
||||
Public Property ImageSizeMode As ImageSizeMode
|
||||
Public Property ImageProperties As New PaintingObjectImageProperties
|
||||
Public Property Tag As String = Nothing
|
||||
<JsonIgnore>
|
||||
Public Property Tag As Object = Nothing
|
||||
Public Property Name As String = ""
|
||||
Public ReadOnly Property PinnedObjects As New List(Of PaintingObject)
|
||||
<JsonIgnore>
|
||||
@@ -51,6 +52,7 @@ Imports Newtonsoft.Json
|
||||
Public ReadOnly Property DrawSelectionMethode As DelegateDrawPaintingObjectMethode = AddressOf DefaultDrawMethodes.DrawSelection
|
||||
Public Property Cursor As Cursor = Cursors.Default
|
||||
Public Property HardcodedSize As Boolean = False
|
||||
Public Property HardcodedLocation As Boolean = False
|
||||
<JsonProperty>
|
||||
Private _Visible As Boolean = True
|
||||
<JsonProperty>
|
||||
@@ -421,6 +423,20 @@ Imports Newtonsoft.Json
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<JsonProperty(NameOf(Tag))>
|
||||
Public Property TagString As String
|
||||
Get
|
||||
If TypeOf Tag Is String Then
|
||||
Return Tag
|
||||
Else
|
||||
Return String.Empty
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
Tag = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property EnableResize As Boolean
|
||||
Get
|
||||
If resizeEngine Is Nothing Then
|
||||
|
||||
Reference in New Issue
Block a user