개정판 cbeff740
undo, redo event 수정
Change-Id: I61a671439db44aeccb922449a8b4b0cccdbd0aa7
KCOM/Controls/AdornerFinal.xaml.cs | ||
---|---|---|
161 | 161 |
/// <summary> |
162 | 162 |
/// 회전 시작할때의 각도 |
163 | 163 |
/// </summary> |
164 |
public double dBeforeAngle { get; set; } |
|
165 | 164 |
|
166 | 165 |
private double angleValue; |
167 | 166 |
public double AngleValue { get => angleValue; |
... | ... | |
179 | 178 |
/// </summary> |
180 | 179 |
private double _ActualAngle { get; set; } |
181 | 180 |
|
182 |
public List<Point> lstBeforePointSet { get; set; } |
|
183 |
|
|
184 | 181 |
public bool IsTextAngle = false; |
185 | 182 |
public Rect BorderSize { get; set; } |
186 | 183 |
public bool TextCompensation = false; |
KCOM/Events/RedoCommand.cs | ||
---|---|---|
80 | 80 |
|
81 | 81 |
foreach (var item in redo.Markup_List) |
82 | 82 |
{ |
83 |
double dOriAngle = 0.0; |
|
84 |
List<Point> lstOriPointSet = new List<Point>(); |
|
85 |
|
|
83 | 86 |
ViewerDataModel.Instance.MarkupControls_USER.Remove((item.Markup as CommentUserInfo)); |
84 | 87 |
|
85 | 88 |
if ((item.Markup as IViewBox) != null) |
86 | 89 |
{ |
90 |
dOriAngle = (item.Markup as IViewBox).CommentAngle; |
|
87 | 91 |
(item.Markup as IViewBox).CommentAngle = item.Angle; |
92 |
item.Angle = dOriAngle; |
|
88 | 93 |
} |
89 | 94 |
if ((item.Markup as TextControl) != null) |
90 | 95 |
{ |
96 |
dOriAngle = (item.Markup as TextControl).CommentAngle; |
|
91 | 97 |
(item.Markup as TextControl).CommentAngle = item.Angle; |
98 |
item.Angle = dOriAngle; |
|
99 |
|
|
100 |
if (item.PointSet.Count > 0) |
|
101 |
{ |
|
102 |
foreach(var point in (item.Markup as IPath).PointSet) |
|
103 |
{ |
|
104 |
lstOriPointSet.Add(point); |
|
105 |
} |
|
106 |
|
|
107 |
Canvas.SetLeft((item.Markup as TextControl), item.PointSet[0].X); |
|
108 |
Canvas.SetTop((item.Markup as TextControl), item.PointSet[0].Y); |
|
92 | 109 |
|
93 |
Canvas.SetLeft((item.Markup as TextControl), item.PointSet[0].X);
|
|
94 |
Canvas.SetTop((item.Markup as TextControl), item.PointSet[0].Y);
|
|
110 |
item.PointSet = lstOriPointSet;
|
|
111 |
}
|
|
95 | 112 |
} |
96 | 113 |
else |
97 | 114 |
{ |
115 |
dOriAngle = (item.Markup).CommentAngle; |
|
98 | 116 |
(item.Markup).CommentAngle = item.Angle; |
117 |
item.Angle = dOriAngle; |
|
118 |
foreach(var point in (item.Markup as IPath).PointSet) |
|
119 |
{ |
|
120 |
lstOriPointSet.Add(point); |
|
121 |
} |
|
99 | 122 |
(item.Markup as IPath).PointSet = item.PointSet; |
123 |
item.PointSet = lstOriPointSet; |
|
100 | 124 |
(item.Markup as CommentUserInfo).UpdateControl(); |
101 | 125 |
} |
102 | 126 |
comment.Add(item.Markup); |
KCOM/Events/UndoCommand.cs | ||
---|---|---|
228 | 228 |
|
229 | 229 |
foreach (var item in undo.Markup_List) |
230 | 230 |
{ |
231 |
double dOriAngle = 0.0; |
|
232 |
List<Point> lstOriPointSet = new List<Point>(); |
|
233 |
|
|
231 | 234 |
ViewerDataModel.Instance.MarkupControls_USER.Remove((item.Markup)); |
232 | 235 |
|
233 | 236 |
if ((item.Markup as IViewBox) != null) |
234 | 237 |
{ |
238 |
dOriAngle = (item.Markup as IViewBox).CommentAngle; |
|
235 | 239 |
(item.Markup as IViewBox).CommentAngle = item.Angle; |
240 |
item.Angle = dOriAngle; |
|
236 | 241 |
} |
237 | 242 |
if ((item.Markup as TextControl) != null) |
238 | 243 |
{ |
244 |
dOriAngle = (item.Markup as TextControl).CommentAngle; |
|
239 | 245 |
(item.Markup as TextControl).CommentAngle = item.Angle; |
246 |
item.Angle = dOriAngle; |
|
240 | 247 |
//(item.Markup as TextControl).CommentAngle = item.BeforeAngle; |
241 |
Canvas.SetLeft((item.Markup as TextControl), item.PointSet[0].X); |
|
242 |
Canvas.SetTop((item.Markup as TextControl), item.PointSet[0].Y); |
|
248 |
if (item.PointSet.Count > 0) |
|
249 |
{ |
|
250 |
foreach(var point in (item.Markup as IPath).PointSet) |
|
251 |
{ |
|
252 |
lstOriPointSet.Add(point); |
|
253 |
} |
|
254 |
Canvas.SetLeft((item.Markup as TextControl), item.PointSet[0].X); |
|
255 |
Canvas.SetTop((item.Markup as TextControl), item.PointSet[0].Y); |
|
256 |
item.PointSet = lstOriPointSet; |
|
257 |
} |
|
243 | 258 |
} |
244 | 259 |
else |
245 | 260 |
{ |
261 |
dOriAngle = (item.Markup).CommentAngle; |
|
246 | 262 |
(item.Markup).CommentAngle = item.Angle; |
263 |
foreach (var point in (item.Markup as IPath).PointSet) |
|
264 |
{ |
|
265 |
lstOriPointSet.Add(point); |
|
266 |
} |
|
247 | 267 |
(item.Markup as IPath).PointSet = item.PointSet; |
268 |
item.PointSet = lstOriPointSet; |
|
248 | 269 |
///(item.Markup as IPath).PointSet = item.BeforePointSet != null ? item.BeforePointSet : new List<Point>(); |
249 | 270 |
(item.Markup as CommentUserInfo).UpdateControl(); |
250 | 271 |
} |
내보내기 Unified diff