Added waiting to pause so the pause resume button work better
This commit is contained in:
parent
ab96018191
commit
86ee3b4b9c
4 changed files with 11 additions and 1 deletions
|
|
@ -2012,7 +2012,7 @@ namespace MatterHackers.MatterControl
|
|||
}),
|
||||
IsPaused = () =>
|
||||
{
|
||||
return printer.Connection.Paused;
|
||||
return printer.Connection.Paused || printer.Connection.WaitingToPause;
|
||||
},
|
||||
PauseToolTip = "Pause Print".Localize(),
|
||||
PauseText = "Pause".Localize(),
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
pauseButton.Visible = true;
|
||||
resumeButton.Visible = false;
|
||||
}
|
||||
|
||||
if (this.HasBeenClosed)
|
||||
{
|
||||
UiThread.ClearInterval(runningInterval);
|
||||
|
|
|
|||
|
|
@ -159,6 +159,8 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
|
||||
public PrinterMove LastDestination { get { return lastDestination; } }
|
||||
|
||||
public bool WaitingToPause { get; private set; }
|
||||
|
||||
public void Add(string line)
|
||||
{
|
||||
// lock queue
|
||||
|
|
@ -191,6 +193,9 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
// Add the pause_gcode to the loadedGCode.GCodeCommandQueue
|
||||
string pauseGCode = printer.Settings.GetValue(SettingsKey.pause_gcode);
|
||||
|
||||
// set the state that we are waiting to pause
|
||||
WaitingToPause = true;
|
||||
|
||||
// put in the gcode for pausing (if any)
|
||||
InjectPauseGCode(pauseGCode);
|
||||
|
||||
|
|
@ -283,6 +288,9 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
printer.Connection.CommunicationState = CommunicationStates.Paused;
|
||||
}
|
||||
|
||||
// remember that we are no longer waiting
|
||||
WaitingToPause = false;
|
||||
|
||||
lineToSend = "";
|
||||
}
|
||||
else if (readOutOfFilament)
|
||||
|
|
|
|||
|
|
@ -2857,6 +2857,7 @@ Make sure that your printer is turned on. Some printers will appear to be connec
|
|||
public ExtrusionMultiplierStream ExtrusionMultiplierStream { get; private set; }
|
||||
|
||||
public FeedRateMultiplierStream FeedRateMultiplierStream { get; private set; }
|
||||
public bool WaitingToPause => pauseHandlingStream?.WaitingToPause == true;
|
||||
|
||||
public void TurnOffPartCoolingFan()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue