Skip to content

Commit

Permalink
Fix null reference editing pos
Browse files Browse the repository at this point in the history
  • Loading branch information
tznind committed Mar 19, 2024
1 parent d019ba3 commit dabb543
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions src/UI/Windows/DimEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace TerminalGuiDesigner.UI.Windows;
public partial class DimEditor : Dialog
{
private Design design;
private Property property { get; }

/// <summary>
/// The final <see cref="Dim"/> value user has configured based on
Expand All @@ -41,7 +40,6 @@ public DimEditor(Design design, Dim oldValue) {
InitializeComponent();

this.design = design;
this.property = property;


Title = "Dim Designer";
Expand Down
3 changes: 1 addition & 2 deletions src/UI/Windows/PosEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ namespace TerminalGuiDesigner.UI.Windows;
public partial class PosEditor : Dialog {

private Design design;
private Property property;

/// <summary>
/// Users configured <see cref="Pos"/> (assembled from radio button
Expand Down Expand Up @@ -63,7 +62,7 @@ public PosEditor(Design design, Pos oldValue) {
ddSide.SetSource(Enum.GetValues(typeof(Side)).Cast<Enum>().ToList());
ddSide.KeyBindings.Add(Key.CursorDown, Command.Expand);

var val = (Pos)property.GetValue();
var val = oldValue;
if(val.GetPosType(siblings,out var type,out var value,out var relativeTo,out var side, out var offset))
{
switch(type)
Expand Down

0 comments on commit dabb543

Please sign in to comment.