개정판 d62c0439
issue #923: remove undo after selecting item, fixed multi selection logic
Change-Id: Id2a6e63336747aeaf3337218f5e2e3b35fba5dfa
KCOM/Events/Event_KeyEvent.cs | ||
---|---|---|
29 | 29 |
|
30 | 30 |
MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn markupReturn = new MarkupToPDF.Controls.Parsing.MarkupParser.MarkupReturn(); |
31 | 31 |
|
32 |
public List<CommentUserInfo> SelectedItems |
|
33 |
{ |
|
34 |
get |
|
35 |
{ |
|
36 |
List<CommentUserInfo> res = new List<CommentUserInfo>(); |
|
37 |
foreach (var item in this.dzMainMenu.SelectLayer.Children) |
|
38 |
{ |
|
39 |
if (item.GetType().Name == "AdornerFinal") |
|
40 |
{ |
|
41 |
foreach (var InnerItem in (item as Controls.AdornerFinal).MemberSet.Cast<Controls.AdornerMember>()) |
|
42 |
{ |
|
43 |
res.Add(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
|
44 |
} |
|
45 |
} |
|
46 |
} |
|
47 |
|
|
48 |
return res; |
|
49 |
} |
|
50 |
} |
|
51 |
|
|
52 | 32 |
public void KeyEventDownAction(object sender, KeyEventArgs e) |
53 | 33 |
{ |
54 | 34 |
switch (e.Key) |
... | ... | |
199 | 179 |
{ |
200 | 180 |
markupReturn = MarkupParser.MarkupToString(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo, App.ViewInfo.UserID); |
201 | 181 |
|
202 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
182 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
203 | 183 |
|
204 | 184 |
if (Item_ != null) |
205 | 185 |
{ |
206 |
id = "|SymbolID|" + ViewerDataModel.Instance.MarkupList_USER.Where
|
|
186 |
id = "|SymbolID|" + ViewerDataModel.Instance.MyMarkupList.Where
|
|
207 | 187 |
(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault().Symbol_ID; |
208 | 188 |
} |
209 | 189 |
else |
... | ... | |
579 | 559 |
#region 삭제하기(Delete) |
580 | 560 |
case Key.Delete: |
581 | 561 |
{ |
582 |
DeleteCommand.Instance.Execute(this.SelectedItems);
|
|
562 |
DeleteCommand.Instance.Execute(SelectionSet.Instance.SelectedItems);
|
|
583 | 563 |
/* |
584 | 564 |
if (this.dzMainMenu.SelectLayer.Children.Count > 0) |
585 | 565 |
{ |
... | ... | |
607 | 587 |
ViewerDataModel.Instance.MarkupControls_USER.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
608 | 588 |
ViewerDataModel.Instance.MarkupControls.Remove(InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo); |
609 | 589 |
|
610 |
var Item_ = ViewerDataModel.Instance.MarkupList_USER.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
611 |
ViewerDataModel.Instance.MarkupList_USER.Remove(Item_);
|
|
590 |
var Item_ = ViewerDataModel.Instance.MyMarkupList.Where(d => d.ID == (InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID).FirstOrDefault();
|
|
591 |
ViewerDataModel.Instance.MyMarkupList.Remove(Item_);
|
|
612 | 592 |
|
613 | 593 |
//임시파일에서도 삭제한다. |
614 | 594 |
TempFile.DelTemp((InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo).CommentID, dzMainMenu.pageNavigator.CurrentPage.PageNumber.ToString()); |
내보내기 Unified diff