From 8c9536f323b13bfc3f8db29eba1f395af32b049c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Thu, 17 Mar 2022 14:28:16 +0100 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B=20GCV:=20Send=20the=20final=20?= =?UTF-8?q?layer=20to=20the=20UI=20as=20well?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4463 --- .../plugins/gcodeviewer/static/js/viewer/worker.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); }; From 6728a174486eb29d2f393414f312324775be107d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 22 Mar 2022 12:07:59 +0100 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=9A=B8=20Re-enable=20connect=20dialog?= =?UTF-8?q?=20w/=20no=20serial=20ports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently disabling it if no serial ports are currently known to the client breaks certain workflows for people. So this is a short-term solution to fix things for them, while technically non-sensical (why offer to connect if we don't see anything to connect to?) So in 1.9.0 this should rather be solved by adding some form of platform agnostic (!) auto-refresh, either regular polling while no port is detected, or even watchdog enabled event based refresh. See #4473. --- src/octoprint/static/js/app/viewmodels/connection.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 () { From 772f9f95da25839dadcc8e3036abd986fc5788af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Wed, 23 Mar 2022 10:23:18 +0100 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=93=8C=20pre-commit:=20Pin=20flake8?= =?UTF-8?q?=20bugbear?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new version will cause pre-commit to fail, we need to fix the newly detected issues but not on frozen code (like master or to a degree the RCs). --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 26e4d5b16..0f25d2818 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear + - flake8-bugbear==22.1.11 - repo: https://github.com/pre-commit/mirrors-prettier rev: v2.1.2 hooks: