개정판 8118ba81
Dash Style 변경 시 Undo 추가
Group 관련 기능 시 Undo 추가
Change-Id: Idd9a674a676acaa0795511419bc949039f06b5fe
KCOM/Events/Implementation/TopMenuEvent.cs | ||
---|---|---|
30 | 30 |
using MarkupToPDF.Controls.Shape; |
31 | 31 |
using MarkupToPDF.Controls.Polygon; |
32 | 32 |
using MarkupToPDF.Controls.Line; |
33 |
using MarkupToPDF.Controls.Cad; |
|
33 | 34 |
|
34 | 35 |
namespace KCOM.Views |
35 | 36 |
{ |
... | ... | |
915 | 916 |
ViewerDataModel.Instance.DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData; |
916 | 917 |
if (this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children.Count > 0) |
917 | 918 |
{ |
918 |
UndoDataGroup UndoData = new UndoDataGroup() |
|
919 |
//UndoDataGroup UndoData = new UndoDataGroup() |
|
920 |
//{ |
|
921 |
// IsUndo = false, |
|
922 |
// Event = EventType.Operation, |
|
923 |
// EventTime = DateTime.Now, |
|
924 |
// DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData, |
|
925 |
// MarkupDataColl = new List<UndoData>() |
|
926 |
//}; |
|
927 |
//UndoData multi_UndoData = new UndoData(); |
|
928 |
|
|
929 |
if (ViewerDataModel.Instance.UndoDataList == null) |
|
919 | 930 |
{ |
920 |
IsUndo = false, |
|
921 |
Event = EventType.Operation, |
|
922 |
EventTime = DateTime.Now, |
|
923 |
DashSize = (cbDashStyle.SelectedValue as DashStyle).dashData, |
|
924 |
MarkupDataColl = new List<UndoData>() |
|
925 |
}; |
|
926 |
UndoData multi_UndoData = new UndoData(); |
|
931 |
return; |
|
932 |
} |
|
933 |
|
|
934 |
List<AdornerMember> AdonerList = GetAdornerItem(); |
|
935 |
|
|
936 |
var comments = (from drawing in AdonerList |
|
937 |
select drawing.DrawingData as CommentUserInfo) |
|
938 |
.Where(x => x is LineControl || x is ArcControl || x is ArrowArcControl || x is ArrowControl_Multi |
|
939 |
|| x is CloudControl || x is PolygonControl || x is PolygonControl || x is RectangleControl || |
|
940 |
x is RectCloudControl || x is TriControl || x is CircleControl || x is InsideWhiteControl || |
|
941 |
x is OverlapWhiteControl || x is ClipWhiteControl || x is CoordinateControl || |
|
942 |
x is MarkupToPDF.Controls.Text.TextControl || x is MarkupToPDF.Controls.Text.ArrowTextControl) |
|
943 |
.ToList(); |
|
944 |
|
|
945 |
UndoCommand.Instance.Push(EventType.Operation, comments); |
|
946 |
|
|
927 | 947 |
|
928 | 948 |
foreach (var item in this.ParentOfType<MainWindow>().dzMainMenu.SelectLayer.Children) |
929 | 949 |
{ |
... | ... | |
1005 | 1025 |
break; |
1006 | 1026 |
} |
1007 | 1027 |
|
1008 |
multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo; |
|
1009 |
UndoData.MarkupDataColl.Add(multi_UndoData); |
|
1010 |
multi_UndoData = new UndoData(); |
|
1028 |
//multi_UndoData.Markup = InnerItem.DrawingData as MarkupToPDF.Common.CommentUserInfo;
|
|
1029 |
//UndoData.MarkupDataColl.Add(multi_UndoData);
|
|
1030 |
//multi_UndoData = new UndoData();
|
|
1011 | 1031 |
} |
1012 | 1032 |
|
1013 |
ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
1014 |
{ |
|
1015 |
ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
1016 |
}); |
|
1017 |
ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
1033 |
//ViewerDataModel.Instance.UndoDataList.Where(data => data.IsUndo == true).ToList().ForEach(i => |
|
1034 |
//{ |
|
1035 |
// ViewerDataModel.Instance.UndoDataList.Remove(i); |
|
1036 |
//}); |
|
1037 |
//ViewerDataModel.Instance.UndoDataList.Add(UndoData); |
|
1038 |
|
|
1018 | 1039 |
} |
1019 | 1040 |
} |
1020 | 1041 |
} |
내보내기 Unified diff