Skip to content

Commit 174aa09

Browse files
author
tznind
committed
Remove line orientation change code as it already happens in Terminal.Gui automatically
1 parent 5e078ab commit 174aa09

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/ToCode/Property.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -100,26 +100,6 @@ public virtual void SetValue(object? value)
100100
{
101101
value = AdjustValueBeingSet(value);
102102

103-
// if a Line and changing Orientation then also flip
104-
// the Height/Width and set appropriate new rune
105-
if (this.PropertyInfo.Name == nameof(Line.Orientation)
106-
&& this.Design.View is Line v && value is Orientation newOrientation)
107-
{
108-
switch (newOrientation)
109-
{
110-
case Orientation.Horizontal:
111-
v.Width = v.Height;
112-
v.Height = 1;
113-
114-
break;
115-
case Orientation.Vertical:
116-
v.Height = v.Width;
117-
v.Width = 1;
118-
break;
119-
default:
120-
throw new ArgumentException($"Unknown Orientation {newOrientation}");
121-
}
122-
}
123103

124104
this.PropertyInfo.SetValue(this.DeclaringObject, value);
125105

0 commit comments

Comments
 (0)