프로젝트

일반

사용자정보

개정판 34ac8db7

ID34ac8db7f7b582586ee927d3fdae3df9b8f7e77f
상위 f0c9e80e
하위 85132173

백흠경이(가) 7달 전에 추가함

Fix: Delete에 대한 Undo/Redo 기능 수정

Change-Id: I55592f4822b661ed7f61c714382bd8d988145ef7

차이점 보기:

KCOM/Controls/AdornerFinal.xaml.cs
1194 1194

  
1195 1195
            var comments = (from drawing in this.Members
1196 1196
                            select drawing.DrawingData as CommentUserInfo).ToList();
1197
            //UndoCommand.Instance.Push(comments, this.AngleValue, 0, lstPointTemp);
1198 1197
            ViewerDataModel.Instance.IsMarkupUpdate = true;
1199 1198
        }
1200 1199

  
......
1213 1212
                return;
1214 1213
            }
1215 1214

  
1216
            
1217
            //if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb))
1218
            //{
1219
            //    return;
1220
            //}
1221

  
1222
            //if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null))
1223
            //{
1224
            //    if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
1225
            //    {
1226
            //        if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
1227
            //        {
1228
            //            return;
1229
            //        }
1230
            //    }
1231
            //}
1232

  
1233 1215
            var comments = (from drawing in this.Members
1234 1216
                            select drawing.DrawingData as CommentUserInfo).ToList();
1235
            //UndoCommand.Instance.Push(comments, this.AngleValue, 0, lstBeforePointSet);
1236
            UndoCommand.Instance.Push(comments);
1217

  
1218
            UndoCommand.Instance.Push(EventType.Operation, comments);
1237 1219
        }
1238 1220

  
1239 1221
        private void rotate_MouseMove(object sender, MouseEventArgs e)
......
1271 1253
            {
1272 1254
                return;
1273 1255
            }
1274
            //if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb))
1275
            //{
1276
            //    return;
1277
            //}
1278
            //if ((null != ViewerDataModel.Instance.UndoDataList.LastOrDefault()) && (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null))
1279
            //{
1280
            //    if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
1281
            //    {
1282
            //        if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
1283
            //        {
1284
            //            return;
1285
            //        }
1286
            //    }
1287
            //}
1288 1256

  
1289 1257
            var comments = (from drawing in this.Members
1290 1258
                            select drawing.DrawingData as CommentUserInfo).ToList();
1291
            //UndoCommand.Instance.Push(comments, this.AngleValue);
1292
            UndoCommand.Instance.Push(comments);
1259

  
1260
            UndoCommand.Instance.Push(EventType.Operation, comments);
1293 1261
        }
1294 1262

  
1295 1263
        private void drag_DragCompleted(object sender, DragCompletedEventArgs e)
......
1298 1266

  
1299 1267
            var comments = (from drawing in this.Members
1300 1268
                            select drawing.DrawingData as CommentUserInfo).ToList();
1301
            //UndoCommand.Instance.Push(comments, this.AngleValue);
1302 1269
        }
1303 1270

  
1304 1271
        private void DragThumb_DragDelta(object sender, DragDeltaEventArgs e)
......
1319 1286

  
1320 1287
                var mainRect = ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect();
1321 1288

  
1322
                //if (ViewerDataModel.Instance.PageAngle == 270 || ViewerDataModel.Instance.PageAngle == 90)
1323
                //{
1324
                //    mainRect = new Rect(0, 0, mainRect.Height, mainRect.Width);
1325
                //}
1326

  
1327 1289
                mainRect = MathHelper.RotateRect(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel.Rect(), new Point(mainRect.Width / 2, mainRect.Height / 2), ViewerDataModel.Instance.PageAngle);
1328 1290

  
1329 1291
                var rect = (this.ContainerContent.FindChildByType<CommentUserInfo>() as CommentUserInfo).ItemRect; //this.AdornerBorder.Bounds(ViewerDataModel.Instance.SystemMain.dzMainMenu.mainPanel);
......
1333 1295
                var moveDirection = mainRect.Movement(rotationRect);
1334 1296

  
1335 1297
                System.Diagnostics.Debug.WriteLine($"horzChange: {horzChange} , vertChange:{vertChange}");
1336
                //System.Diagnostics.Debug.WriteLine($"DragDeltaEventArgs : Top:{rect.Top}, Left:{rect.Left}, Right:{rect.Right}, Bottom:{rect.Bottom} ,BottomLeft : {rect.BottomLeft} BottomRight : {rect.BottomRight}");
1337

  
1338
                //if (Math.Abs(horzChange) > 0)
1339
                //{
1340
                //    if ((horzChange < 0 && !moveDirection.Left) || (horzChange > 0 && !moveDirection.Right))
1341
                //    {
1342
                //        //this.TranslateItems(horzChange * -1, 0);
1343
                //        //e.Handled = true;
1344
                //        horzChange = 0;
1345
                //        newMousePoint.X = this.CurrentMousePoint.X;
1346
                //    }
1347
                //}
1348

  
1349
                //if (Math.Abs(vertChange) > 0)
1350
                //{
1351
                //    if ((vertChange < 0 && !moveDirection.Up) || (vertChange > 0 && !moveDirection.Down))
1352
                //    {
1353
                //        //this.TranslateItems(0, vertChange * -1);
1354
                //        //e.Handled = true;
1355
                //        vertChange = 0;
1356
                //        newMousePoint.Y = this.CurrentMousePoint.Y;
1357
                //    }
1358
                //}
1359 1298

  
1360 1299
                this.TranslateItems(horzChange, vertChange);
1361 1300
            }
......
1538 1477
            }
1539 1478
            /// up to here
1540 1479

  
1541
            //dBeforeAngle = this.angleValue;
1542

  
1543 1480
            if (ViewerDataModel.Instance.UndoDataList == null)
1544 1481
            {
1545 1482
                return;
1546 1483
            }
1547 1484

  
1548
            //if ((ViewerDataModel.Instance.UndoDataList.Count > 0) && ViewerDataModel.Instance.UndoDataList.LastOrDefault().Event == EventType.Thumb)
1549
            //{
1550
            //    return;
1551
            //}
1552

  
1553
            //if ((ViewerDataModel.Instance.UndoDataList.Count > 0) && ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl != null)
1554
            //{
1555
            //    if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.Count > 0)
1556
            //    {
1557
            //        if (ViewerDataModel.Instance.UndoDataList.LastOrDefault().MarkupDataColl.FirstOrDefault().PointSet != null)
1558
            //        {
1559
            //            return;
1560
            //        }
1561
            //    }
1562
            //}
1563

  
1564 1485
            var comments = (from drawing in this.Members
1565 1486
                            select drawing.DrawingData as CommentUserInfo).ToList();
1566
            UndoCommand.Instance.Push(comments);
1487
            UndoCommand.Instance.Push(EventType.Operation, comments);
1567 1488
        }
1568 1489
        
1569 1490
        private void rotate_DragCompleted(object sender, DragCompletedEventArgs e)
......
1572 1493

  
1573 1494
            var comments = (from drawing in this.Members
1574 1495
                            select drawing.DrawingData as CommentUserInfo).ToList();
1575
            //UndoCommand.Instance.Push(comments, this.AngleValue, dBeforeAngle);
1576 1496
        }
1577 1497

  
1578 1498
        public void ControlPointMouseLeftButtonDown(object sender, MouseButtonEventArgs e)

내보내기 Unified diff

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