diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac833bca4..169d23636 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,7 +52,7 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear + - flake8-bugbear==22.1.11 - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.5.1 hooks: diff --git a/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js b/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js index e0d4a6567..02492cfa1 100644 --- a/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js +++ b/src/octoprint/plugins/gcodeviewer/static/js/viewer/worker.js @@ -709,12 +709,17 @@ var doParse = function () { } if (sendMultiLayer.indexOf(sendLayer) === -1) { - sendMultiLayer[sendMultiLayer.length] = sendLayer; + sendMultiLayer.push(sendLayer); } sendLayer = undefined; } } + + // we are done, send the final layer + if (sendMultiLayer.indexOf(activeLayer) === -1) { + sendMultiLayer.push(activeLayer); + } sendLayersToParent(sendMultiLayer, 100); }; diff --git a/src/octoprint/static/js/app/viewmodels/connection.js b/src/octoprint/static/js/app/viewmodels/connection.js index 1bd6b0d98..664c30918 100644 --- a/src/octoprint/static/js/app/viewmodels/connection.js +++ b/src/octoprint/static/js/app/viewmodels/connection.js @@ -40,7 +40,8 @@ $(function () { self.isLoading = ko.observable(undefined); self.enableConnect = ko.pureComputed(function () { - return self.enablePort() || !self.isErrorOrClosed(); + //return self.enablePort() || !self.isErrorOrClosed(); + return true; // enable always for now, until we have an auto refresh in 1.9.0 }); self.buttonText = ko.pureComputed(function () {