프로젝트

일반

사용자정보

개정판 f5407d37

IDf5407d3721f3a03b88c6cf519c3d2c48266de2c7
상위 cc37956c
하위 9005f973, cbeff740

임예철이(가) 11달 전에 추가함

undo 기능 재 수정

Change-Id: Ib4c866b586878087b847ad5c84eb88e3779cbe5e

차이점 보기:

KCOM/Common/SelectionSet.cs
149 149
                                    var control = InnerItem.DrawingData as CommentUserInfo;
150 150
                                    ViewerDataModel.Instance.MarkupControls_USER.Add(control);
151 151

  
152
                                    var vUndoBeforeTargetItem = 
153
                                        ViewerDataModel.Instance.UndoDataList.ToList().FindAll(x => x.Markup_List.FindAll
154
                                        (y => (y.Markup == control && y.Angle != y.BeforeAngle) || y.Markup == control && y.PointSet != y.BeforePointSet).Count > 0)
155
                                        .OrderByDescending(order => order.EventTime).FirstOrDefault();
152
                                    var vUndoBeforeTargetItem =
153
                                        ViewerDataModel.Instance.UndoDataList.ToList().OrderBy(x => x.EventTime).LastOrDefault();
156 154

  
157
                                    if (vUndoBeforeTargetItem != null)
155
                                    if (vUndoBeforeTargetItem != null && vUndoBeforeTargetItem.Event == Event_Type.Thumb)
158 156
                                    {
159 157

  
160 158
                                    }
KCOM/Controls/AdornerFinal.xaml.cs
1182 1182
            this.isDragging = false;
1183 1183
            DraggerThumb = null;
1184 1184

  
1185
            List<Point> lstPointTemp = new List<Point>();
1186
            foreach(var vPoint in this.lstBeforePointSet)
1187
            {
1188
                lstPointTemp.Add(vPoint);
1189
            }
1190 1185

  
1191 1186
            var comments = (from drawing in this.Members
1192 1187
                            select drawing.DrawingData as CommentUserInfo).ToList();
KCOM/Events/RedoCommand.cs
95 95
                            }
96 96
                            else
97 97
                            {
98
                                (item.Markup).CommentAngle = item.Angle;
98 99
                                (item.Markup as IPath).PointSet = item.PointSet;
99 100
                                (item.Markup as CommentUserInfo).UpdateControl();
100 101
                            }
KCOM/Events/UndoCommand.cs
139 139
                {
140 140
                    points.Add(point);
141 141
                }
142
                multi_Undo_Data.BeforePointSet = points;
142
                multi_Undo_Data.PointSet = points;
143 143

  
144 144
                if (comment is ArrowTextControl)
145 145
                {
......
236 236
                            }
237 237
                            if ((item.Markup as TextControl) != null)
238 238
                            {
239
                                //(item.Markup as TextControl).CommentAngle = item.Angle;
240
                                (item.Markup as TextControl).CommentAngle = item.BeforeAngle;
239
                                (item.Markup as TextControl).CommentAngle = item.Angle;
240
                                //(item.Markup as TextControl).CommentAngle = item.BeforeAngle;
241 241
                                Canvas.SetLeft((item.Markup as TextControl), item.PointSet[0].X);
242 242
                                Canvas.SetTop((item.Markup as TextControl), item.PointSet[0].Y);
243 243
                            }
244 244
                            else
245 245
                            {
246
                                (item.Markup).CommentAngle = item.BeforeAngle;
247
                                //(item.Markup as IPath).PointSet = item.PointSet;
246
                                (item.Markup).CommentAngle = item.Angle;
247
                                (item.Markup as IPath).PointSet = item.PointSet;
248 248
                                ///(item.Markup as IPath).PointSet = item.BeforePointSet != null ? item.BeforePointSet : new List<Point>();
249 249
                                (item.Markup as CommentUserInfo).UpdateControl();
250 250
                            }
MarkupToPDF/Common/Undo_data.cs
40 40
        public Double Opacity { get; set; }
41 41
        public Controls.Common.PaintSet paint { get; set; }
42 42
        public double Angle { get; set; }
43
        public double BeforeAngle { get; set; }
44
        public List<Point> BeforePointSet { get; set; }
45 43
    }
46 44

  
47 45
    public enum Event_Type
MarkupToPDF/Controls/Common/MathSet.cs
2 2
using System.Collections.Generic;
3 3
using System.Linq;
4 4
using System.Windows;
5
using System.Windows.Media;
5 6

  
6 7
namespace MarkupToPDF.Controls.Common
7 8
{

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)