Make sure we always set the enabled state
This commit is contained in:
parent
825f0389c6
commit
c57a297ccf
2 changed files with 7 additions and 12 deletions
|
|
@ -163,21 +163,16 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
|
||||
private void EnableControls()
|
||||
{
|
||||
if (isEnabled != printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting)
|
||||
{
|
||||
isEnabled = printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting;
|
||||
isEnabled = printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting;
|
||||
|
||||
var flowLayout = this.PopupContent.Children.OfType<FlowLayoutWidget>().FirstOrDefault();
|
||||
if (flowLayout != null)
|
||||
var flowLayout = this.PopupContent.Children.OfType<FlowLayoutWidget>().FirstOrDefault();
|
||||
if (flowLayout != null)
|
||||
{
|
||||
foreach (var child in flowLayout.Children.Except(alwaysEnabled))
|
||||
{
|
||||
foreach (var child in flowLayout.Children.Except(alwaysEnabled))
|
||||
{
|
||||
child.Enabled = isEnabled == true;
|
||||
}
|
||||
child.Enabled = isEnabled == true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue