Browse Source

Changed if statements to have braces

Moved comments above if
pull/4823/head
Adir 6 years ago
parent
commit
41c4630bbb
  1. 8
      src/Avalonia.Controls/Button.cs
  2. 8
      src/Avalonia.Controls/MenuItem.cs

8
src/Avalonia.Controls/Button.cs

@ -208,9 +208,11 @@ namespace Avalonia.Controls
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
{
if (_hotkey != null)
// Control attached again, set Hotkey to create a hotkey manager for this control
if (_hotkey != null) // Control attached again, set Hotkey to create a hotkey manager for this control
{
HotKey = _hotkey;
}
base.OnAttachedToLogicalTree(e);
if (Command != null)
@ -221,9 +223,9 @@ namespace Avalonia.Controls
protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
{
// This will cause the hotkey manager to dispose the observer and the reference to this control
if (HotKey != null)
{
// This will cause the hotkey manager to dispose the observer and the reference to this control
_hotkey = HotKey;
HotKey = null;
}

8
src/Avalonia.Controls/MenuItem.cs

@ -338,9 +338,11 @@ namespace Avalonia.Controls
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
{
if (_hotkey != null)
// Control attached again, set Hotkey to create a hotkey manager for this control
if (_hotkey != null) // Control attached again, set Hotkey to create a hotkey manager for this control
{
HotKey = _hotkey;
}
base.OnAttachedToLogicalTree(e);
if (Command != null)
@ -351,9 +353,9 @@ namespace Avalonia.Controls
protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
{
// This will cause the hotkey manager to dispose the observer and the reference to this control
if (HotKey != null)
{
// This will cause the hotkey manager to dispose the observer and the reference to this control
_hotkey = HotKey;
HotKey = null;
}

Loading…
Cancel
Save