Skip to content

Commit

Permalink
Work around another Mono bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekka committed Jul 8, 2018
1 parent 6ee142d commit bbbd69a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Labyrinth3/IDE/Controls/RTFPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,18 @@ public void UpdateUI()
this.StrikeBtn.Pushed = this.ContentBox.SelectionFont.Strikeout;
}
this.BulletBtn.Pushed = this.ContentBox.SelectionBullet;
this.LeftBtn.Pushed = this.ContentBox.SelectionAlignment == HorizontalAlignment.Left;
this.CentreBtn.Pushed = this.ContentBox.SelectionAlignment == HorizontalAlignment.Center;
this.RightBtn.Pushed = this.ContentBox.SelectionAlignment == HorizontalAlignment.Right;
try
{
this.LeftBtn.Pushed = this.ContentBox.SelectionAlignment == HorizontalAlignment.Left;
this.CentreBtn.Pushed = this.ContentBox.SelectionAlignment == HorizontalAlignment.Center;
this.RightBtn.Pushed = this.ContentBox.SelectionAlignment == HorizontalAlignment.Right;
}
catch (NullReferenceException e)
{ // this feature is bugged in Mono so pick a default
this.LeftBtn.Pushed = true;
this.CentreBtn.Pushed = false;
this.RightBtn.Pushed = false;
}
this.UnindentBtn.Enabled = this.ContentBox.SelectionIndent > 0;
this.IndentBtn.Enabled = true;
}
Expand Down

0 comments on commit bbbd69a

Please sign in to comment.