Hotend controls should consider printing status
- Issue MatterHackers/MCCentral#4330 Hot end controls should be disabled while printing
This commit is contained in:
parent
09dbb18021
commit
3296d1edca
1 changed files with 5 additions and 5 deletions
|
|
@ -113,7 +113,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
|
||||
printer.Connection.CommunicationStateChanged.RegisterEvent((s, e) =>
|
||||
{
|
||||
enableControls();
|
||||
this.EnableControls();
|
||||
}, ref unregisterEvents);
|
||||
|
||||
foreach (var child in this.Children)
|
||||
|
|
@ -148,7 +148,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
enableControls();
|
||||
this.EnableControls();
|
||||
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
|
@ -161,11 +161,11 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
|
||||
bool? isEnabled = null;
|
||||
|
||||
private void enableControls()
|
||||
private void EnableControls()
|
||||
{
|
||||
if (isEnabled != printer.Connection.IsConnected)
|
||||
if (isEnabled != printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting)
|
||||
{
|
||||
isEnabled = printer.Connection.IsConnected;
|
||||
isEnabled = printer.Connection.IsConnected && !printer.Connection.PrinterIsPrinting;
|
||||
|
||||
var flowLayout = this.PopupContent.Children.OfType<FlowLayoutWidget>().FirstOrDefault();
|
||||
if (flowLayout != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue