diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-06 14:03:45 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-06 14:03:45 +0200 |
| commit | b32341437ba3e66ca487b0685b352af59e4ad0f5 (patch) | |
| tree | 6804697739fd207de854ba974a8838add78bd3cd /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels | |
| parent | 40ab3cf70594a0b77592879e9bcae84823c5e1f2 (diff) | |
| download | Tango-b32341437ba3e66ca487b0685b352af59e4ad0f5.tar.gz Tango-b32341437ba3e66ca487b0685b352af59e4ad0f5.zip | |
Improved BrushStop Offset clipping.
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> |
