diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 4cf14a216..4e7c5ec12 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -1015,11 +1015,17 @@ namespace Tango.MachineStudio.Developer.ViewModels /// <param name="droppedStop">The dropped stop.</param> public void OnDropBrushStop(BrushStop draggedStop, BrushStop droppedStop) { + SelectedSegment.BrushStops.Swap(draggedStop, droppedStop); + int tmpIndex = draggedStop.StopIndex; draggedStop.StopIndex = droppedStop.StopIndex; droppedStop.StopIndex = tmpIndex; - SelectedSegment.BrushStops.Swap(draggedStop, droppedStop); + if (SelectedSegment.BrushStops.Count > 1) + { + SelectedSegment.BrushStops.First().OffsetPercent = 0; + SelectedSegment.BrushStops.Last().OffsetPercent = 100; + } } /// <summary> |
