프로젝트

일반

사용자정보

개정판 fd452a01

IDfd452a0147d5e3680a33bfb401f315733b8747ad
상위 3b797b23
하위 a2c29ea2

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

Undo 수정

Change-Id: Ic43e4c2eb2d06d8e27e8154f09ffe4728ce3c96c

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
159 159
        private List<double> AlignedAngles {get;} = new List<double>() { 0, 30, 45, 60, 90, 120, 135, 150, 180, 210, 225, 240, 270, 300, 315, 330, 360 };
160 160

  
161 161
        private double angleValue;
162
        public double dBeforeAngle { get; set; }
162 163

  
163 164
        public double AngleValue { get => angleValue;
164 165
            set
......
170 171
            }
171 172
        }
172 173

  
174
        public List<Point> lstBeforePointSet { get; set; }
175

  
173 176
        public bool IsTextAngle = false;
174 177
        public Rect BorderSize { get; set; }
175 178
        public bool TextCompensation = false;
......
1216 1219
            this.isDragging = false;
1217 1220
            DraggerThumb = null;
1218 1221

  
1222
            List<Point> lstPointTemp = new List<Point>();
1223
            foreach(var vPoint in this.lstBeforePointSet)
1224
            {
1225
                lstPointTemp.Add(vPoint);
1226
            }
1227

  
1219 1228
            var comments = (from drawing in this.Members
1220 1229
                            select drawing.DrawingData as CommentUserInfo).ToList();
1221
            UndoCommand.Instance.Push(comments, this.AngleValue);
1230
            UndoCommand.Instance.Push(comments, this.AngleValue, 0, lstPointTemp);
1222 1231
            ViewerDataModel.Instance.IsMarkupUpdate = true;
1223 1232
        }
1224 1233

  
......
1237 1246
                return;
1238 1247
            }
1239 1248

  
1249
            if (lstBeforePointSet == null)
1250
                lstBeforePointSet = new List<Point>();
1251

  
1252
            lstBeforePointSet.Clear();
1253
            foreach(var vPoint in ((dynamic)this.Members.FirstOrDefault().DrawingData).PointSet)
1254
            {
1255
                lstBeforePointSet.Add(vPoint);
1256
            }
1257

  
1258
            //lstBeforePointSet = ((dynamic)this.Members.FirstOrDefault().DrawingData).PointSet;
1259

  
1240 1260
            if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == Event_Type.Thumb))
1241 1261
            {
1242 1262
                return;
......
1255 1275

  
1256 1276
            var comments = (from drawing in this.Members
1257 1277
                            select drawing.DrawingData as CommentUserInfo).ToList();
1258
            UndoCommand.Instance.Push(comments, this.AngleValue);
1278
            UndoCommand.Instance.Push(comments, this.AngleValue, 0, lstBeforePointSet);
1259 1279
        }
1260 1280

  
1261 1281
        private void rotate_MouseMove(object sender, MouseEventArgs e)
......
1549 1569
            }
1550 1570
            /// up to here
1551 1571

  
1572
            dBeforeAngle = this.angleValue;
1573

  
1552 1574
            if (ViewerDataModel.Instance.UndoDataList == null)
1553 1575
            {
1554 1576
                return;
......
1572 1594

  
1573 1595
            var comments = (from drawing in this.Members
1574 1596
                            select drawing.DrawingData as CommentUserInfo).ToList();
1575
            UndoCommand.Instance.Push(comments, this.AngleValue);
1597
            UndoCommand.Instance.Push(comments, this.AngleValue, this.angleValue);
1576 1598
        }
1577 1599
        
1578 1600
        private void rotate_DragCompleted(object sender, DragCompletedEventArgs e)
1579 1601
        {
1580 1602
            rotateTop.Cursor = new Cursor(App.DefaultArrowCursorStream);
1581 1603

  
1604

  
1605

  
1582 1606
            var comments = (from drawing in this.Members
1583 1607
                            select drawing.DrawingData as CommentUserInfo).ToList();
1584
            UndoCommand.Instance.Push(comments, this.AngleValue);
1608
            UndoCommand.Instance.Push(comments, this.AngleValue, dBeforeAngle);
1585 1609
        }
1586 1610

  
1587 1611
        public void ControlPointMouseLeftButtonDown(object sender, MouseButtonEventArgs e)

내보내기 Unified diff

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