🐛 gcv: get rid of double load
Could happen if not switched to tab yet after reload, then switching over. Mentioned in #4772
This commit is contained in:
1 parent
9487e4d0b2
commit
f88bae066c
1 file changed
+6
-4
@@ -345,8 +345,6 @@ $(function () {
|
||||
|
||||
self.currentlyPrinting = false;
|
||||
|
||||
self.errorCount = 0;
|
||||
|
||||
self.layerSlider = undefined;
|
||||
self.layerCommandSlider = undefined;
|
||||
|
||||
@@ -510,7 +508,12 @@ $(function () {
|
||||
self.loadFile = function (path, date, size) {
|
||||
self.enableReload(false);
|
||||
self.needsLoad = false;
|
||||
if (self.status === "idle" && self.errorCount < 3) {
|
||||
if (
|
||||
self.status === "idle" &&
|
||||
self.cachedPath !== path &&
|
||||
self.cachedDate !== date &&
|
||||
self.cachedSize !== size
|
||||
) {
|
||||
self.status = "request";
|
||||
|
||||
self.cachedPath = path;
|
||||
@@ -609,7 +612,6 @@ $(function () {
|
||||
) {
|
||||
self._renderPercentage(data.progress.completion);
|
||||
}
|
||||
self.errorCount = 0;
|
||||
} else {
|
||||
if (self.status === "idle") self.clear();
|
||||
if (
|
||||
|
||||
Reference in new issue
Block a user