개정판 fd452a01
Undo 수정
Change-Id: Ic43e4c2eb2d06d8e27e8154f09ffe4728ce3c96c
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
159 | 159 |
private List<double> AlignedAngles {get;} = new List<double>() { 0, 30, 45, 60, 90, 120, 135, 150, 180, 210, 225, 240, 270, 300, 315, 330, 360 }; |
160 | 160 |
|
161 | 161 |
private double angleValue; |
162 |
public double dBeforeAngle { get; set; } |
|
162 | 163 |
|
163 | 164 |
public double AngleValue { get => angleValue; |
164 | 165 |
set |
... | ... | |
170 | 171 |
} |
171 | 172 |
} |
172 | 173 |
|
174 |
public List<Point> lstBeforePointSet { get; set; } |
|
175 |
|
|
173 | 176 |
public bool IsTextAngle = false; |
174 | 177 |
public Rect BorderSize { get; set; } |
175 | 178 |
public bool TextCompensation = false; |
... | ... | |
1216 | 1219 |
this.isDragging = false; |
1217 | 1220 |
DraggerThumb = null; |
1218 | 1221 |
|
1222 |
List<Point> lstPointTemp = new List<Point>(); |
|
1223 |
foreach(var vPoint in this.lstBeforePointSet) |
|
1224 |
{ |
|
1225 |
lstPointTemp.Add(vPoint); |
|
1226 |
} |
|
1227 |
|
|
1219 | 1228 |
var comments = (from drawing in this.Members |
1220 | 1229 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1221 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
|
1230 |
UndoCommand.Instance.Push(comments, this.AngleValue, 0, lstPointTemp);
|
|
1222 | 1231 |
ViewerDataModel.Instance.IsMarkupUpdate = true; |
1223 | 1232 |
} |
1224 | 1233 |
|
... | ... | |
1237 | 1246 |
return; |
1238 | 1247 |
} |
1239 | 1248 |
|
1249 |
if (lstBeforePointSet == null) |
|
1250 |
lstBeforePointSet = new List<Point>(); |
|
1251 |
|
|
1252 |
lstBeforePointSet.Clear(); |
|
1253 |
foreach(var vPoint in ((dynamic)this.Members.FirstOrDefault().DrawingData).PointSet) |
|
1254 |
{ |
|
1255 |
lstBeforePointSet.Add(vPoint); |
|
1256 |
} |
|
1257 |
|
|
1258 |
//lstBeforePointSet = ((dynamic)this.Members.FirstOrDefault().DrawingData).PointSet; |
|
1259 |
|
|
1240 | 1260 |
if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == Event_Type.Thumb)) |
1241 | 1261 |
{ |
1242 | 1262 |
return; |
... | ... | |
1255 | 1275 |
|
1256 | 1276 |
var comments = (from drawing in this.Members |
1257 | 1277 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1258 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
|
1278 |
UndoCommand.Instance.Push(comments, this.AngleValue, 0, lstBeforePointSet);
|
|
1259 | 1279 |
} |
1260 | 1280 |
|
1261 | 1281 |
private void rotate_MouseMove(object sender, MouseEventArgs e) |
... | ... | |
1549 | 1569 |
} |
1550 | 1570 |
/// up to here |
1551 | 1571 |
|
1572 |
dBeforeAngle = this.angleValue; |
|
1573 |
|
|
1552 | 1574 |
if (ViewerDataModel.Instance.UndoDataList == null) |
1553 | 1575 |
{ |
1554 | 1576 |
return; |
... | ... | |
1572 | 1594 |
|
1573 | 1595 |
var comments = (from drawing in this.Members |
1574 | 1596 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1575 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
|
1597 |
UndoCommand.Instance.Push(comments, this.AngleValue, this.angleValue);
|
|
1576 | 1598 |
} |
1577 | 1599 |
|
1578 | 1600 |
private void rotate_DragCompleted(object sender, DragCompletedEventArgs e) |
1579 | 1601 |
{ |
1580 | 1602 |
rotateTop.Cursor = new Cursor(App.DefaultArrowCursorStream); |
1581 | 1603 |
|
1604 |
|
|
1605 |
|
|
1582 | 1606 |
var comments = (from drawing in this.Members |
1583 | 1607 |
select drawing.DrawingData as CommentUserInfo).ToList(); |
1584 |
UndoCommand.Instance.Push(comments, this.AngleValue); |
|
1608 |
UndoCommand.Instance.Push(comments, this.AngleValue, dBeforeAngle);
|
|
1585 | 1609 |
} |
1586 | 1610 |
|
1587 | 1611 |
public void ControlPointMouseLeftButtonDown(object sender, MouseButtonEventArgs e) |
내보내기 Unified diff