Fix for select&print not working for SD files anymore
Timing issue, "OctoPrint.job.start()" would be called at a time when the file had not yet been selected on the server. Hence a different approach, calculating printerAfterLoading parameter based on existing information at the time of clicking the load button and using the print parameter on the select file API again, as previously.
This commit is contained in:
parent
174ffdf06f
commit
c194cabdcf
1 changed files with 4 additions and 7 deletions
|
|
@ -402,13 +402,10 @@ $(function() {
|
|||
if (!file) {
|
||||
return;
|
||||
}
|
||||
OctoPrint.files.select(file.origin, file.path)
|
||||
.done(function() {
|
||||
var withinPrintDimensions = self.evaluatePrintDimensions(file, true);
|
||||
if (withinPrintDimensions && printAfterLoad) {
|
||||
OctoPrint.job.start();
|
||||
}
|
||||
});
|
||||
var withinPrintDimensions = self.evaluatePrintDimensions(file, true);
|
||||
var print = printAfterLoad && withinPrintDimensions;
|
||||
|
||||
OctoPrint.files.select(file.origin, file.path, print);
|
||||
};
|
||||
|
||||
self.removeFile = function(file, event) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue