OSDN Git Service

グリッパーが存在しないときは無駄な計算を行わないようにした
authorgdkhd812 <test@yahoo.co.jp>
Wed, 11 Oct 2017 15:42:56 +0000 (00:42 +0900)
committergdkhd812 <test@yahoo.co.jp>
Wed, 11 Oct 2017 15:42:56 +0000 (00:42 +0900)
Core/Controller.cs

index 3f6b2e9..be742ef 100644 (file)
@@ -103,13 +103,17 @@ namespace FooEditEngine
         {
             if (this.IsReverseSelect())
             {
-                this.Document.SelectGrippers.BottomRight.MoveByIndex(this.View, this.SelectionStart);
-                this.Document.SelectGrippers.BottomLeft.MoveByIndex(this.View, this.SelectionStart + this.SelectionLength);
+                if (this.Document.SelectGrippers.BottomRight.Enabled)
+                    this.Document.SelectGrippers.BottomRight.MoveByIndex(this.View, this.SelectionStart);
+                if (this.Document.SelectGrippers.BottomLeft.Enabled)
+                    this.Document.SelectGrippers.BottomLeft.MoveByIndex(this.View, this.SelectionStart + this.SelectionLength);
             }
             else
             {
-                this.Document.SelectGrippers.BottomLeft.MoveByIndex(this.View, this.SelectionStart);
-                this.Document.SelectGrippers.BottomRight.MoveByIndex(this.View, this.SelectionStart + this.SelectionLength);
+                if (this.Document.SelectGrippers.BottomLeft.Enabled)
+                    this.Document.SelectGrippers.BottomLeft.MoveByIndex(this.View, this.SelectionStart);
+                if (this.Document.SelectGrippers.BottomRight.Enabled)
+                    this.Document.SelectGrippers.BottomRight.MoveByIndex(this.View, this.SelectionStart + this.SelectionLength);
             }
         }