개정판 490208bd
Fix: 붙여넣기한 객체가 맨 위로 오도록 수정
Change-Id: I328c97aa0e2cc71af60f34b585c24429ac650b6a
KCOM/Events/PasteCommand.cs | ||
---|---|---|
68 | 68 |
{ |
69 | 69 |
List<MarkupToPDF.Common.CommentUserInfo> adornerSet = new List<MarkupToPDF.Common.CommentUserInfo>(); |
70 | 70 |
|
71 |
//강인구 Undo/Redo 보류 |
|
72 | 71 |
MarkupToPDF.Common.UndoDataGroup UndoDataGrp = new UndoDataGroup() |
73 | 72 |
{ |
74 | 73 |
IsUndo = false, |
... | ... | |
77 | 76 |
|
78 | 77 |
foreach (string parse in data) |
79 | 78 |
{ |
80 |
if (parse != "")
|
|
79 |
if (!string.IsNullOrEmpty(parse))
|
|
81 | 80 |
{ |
82 |
string[] data2 = new string[2]; |
|
83 |
data2 = parse.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
|
81 |
string[] data2 = parse.Split(delimiterChars2, StringSplitOptions.RemoveEmptyEntries); |
|
84 | 82 |
|
85 | 83 |
System.Windows.Controls.Control item = await MarkupParser.ParseExAsync(App.BaseAddress, ViewerDataModel.Instance.NewMarkupCancelToken(), App.ViewInfo.ProjectNO, data2[0], ViewerDataModel.Instance.MarkupControls_USER, ViewerDataModel.Instance.PageAngle, "#FFFF0000", string.Empty, |
86 | 84 |
STAMP_Contents: App.SystemInfo.STAMP_CONTENTS); |
87 |
|
|
88 |
var control = (item as MarkupToPDF.Common.CommentUserInfo); |
|
85 |
if (!(item is MarkupToPDF.Common.CommentUserInfo control)) continue; |
|
86 |
#region 리스트의 맨 끝에 추가 |
|
87 |
int index = ViewerDataModel.Instance.MarkupControls_USER.ToList().FindIndex(x => x == control); |
|
88 |
ViewerDataModel.Instance.MarkupControls_USER.RemoveAt(index); |
|
89 |
ViewerDataModel.Instance.MarkupControls_USER.Add(control); |
|
90 |
#endregion |
|
89 | 91 |
|
90 | 92 |
control.CommentID = Commons.ShortGuid(); |
91 | 93 |
control.MarkupInfoID = App.Custom_ViewInfoId; |
92 | 94 |
control.IsNew = true; |
95 |
control.ZIndex = CommentUserInfo.MaxZIndex; |
|
93 | 96 |
|
94 | 97 |
if (data2.Length >= 2) |
95 | 98 |
{ |
MarkupToPDF/Controls/Parsing/MarkupParse.cs | ||
---|---|---|
271 | 271 |
|
272 | 272 |
await writer.WriteAsync(xamlData); |
273 | 273 |
await writer.FlushAsync(); |
274 |
} |
|
275 |
stream.Position = 0; |
|
276 | 274 |
|
277 |
object obj = XamlReader.Load(stream); |
|
278 |
_instance.Base_ViewBox.Child = obj as UIElement; |
|
279 |
_instance.SetViewBox(); |
|
275 |
stream.Position = 0; |
|
276 |
|
|
277 |
object obj = XamlReader.Load(stream); |
|
278 |
_instance.Base_ViewBox.Child = obj as UIElement; |
|
279 |
_instance.SetViewBox(); |
|
280 |
} |
|
280 | 281 |
} |
281 | 282 |
} |
282 | 283 |
else if(control is ImgControl) |
... | ... | |
305 | 306 |
|
306 | 307 |
SolidColorBrush _SetColor = new SolidColorBrush(Common.ValueConverter.StringToColorConverter.Parse(DisplayColor)); |
307 | 308 |
string[] delimiterChars = { "|DZ|" }; |
308 |
string[] delimiterChars2 = { "|" }; |
|
309 | 309 |
string[] data = MarkupString.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); |
310 | 310 |
|
311 | 311 |
foreach (var dataPease in data) |
내보내기 Unified diff