Made the temperature widgets reflect the actual on off state of the printer
This commit is contained in:
parent
de2200050a
commit
5f2dc2699d
3 changed files with 23 additions and 10 deletions
|
|
@ -117,7 +117,7 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
},
|
||||
enforceGutter: false));
|
||||
|
||||
CheckBox heatToggle = hotendRow.ChildrenRecursive<CheckBox>().FirstOrDefault();
|
||||
heatToggle = hotendRow.ChildrenRecursive<CheckBox>().FirstOrDefault();
|
||||
heatToggle.Name = "Toggle Heater";
|
||||
|
||||
// put in the temp control
|
||||
|
|
@ -132,10 +132,6 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
if (heatToggle.Checked)
|
||||
{
|
||||
SetTargetTemperature(settingsTemperature.Value);
|
||||
if (settingsTemperature.Value == 0)
|
||||
{
|
||||
heatToggle.Checked = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -179,6 +175,16 @@ namespace MatterHackers.MatterControl.ActionBar
|
|||
return widget;
|
||||
}
|
||||
|
||||
public override void OnDraw(Graphics2D graphics2D)
|
||||
{
|
||||
if (heatToggle != null)
|
||||
{
|
||||
heatToggle.Checked = printer.Connection.TargetBedTemperature != 0;
|
||||
}
|
||||
|
||||
base.OnDraw(graphics2D);
|
||||
}
|
||||
|
||||
protected override void SetTargetTemperature(double targetTemp)
|
||||
{
|
||||
double goalTemp = (int)(targetTemp + .5);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue