automatically remove orphaned variable watchers

pull/89/head v5.4.4
jmoenig 2020-01-11 01:30:55 +01:00
rodzic b422a0c459
commit e1ac80b330
4 zmienionych plików z 20 dodań i 7 usunięć

Wyświetl plik

@ -7,12 +7,16 @@
* **Translation Updates:**
## 5.4.4:
* **Notable Fix**
* **Notable Fixes**
* fixed strings library format
* automatically remove orphaned variable watchers
### 2020-01-11
* objects: automatically remove orphaned variable watchers
* prepared patch
### 2020-01-10
* fixed strings library format
* prepared patch
## 5.4.3:
* **Notable Fix**

Wyświetl plik

@ -8,8 +8,8 @@
<script type="text/javascript" src="src/widgets.js?version=2020-01-03"></script>
<script type="text/javascript" src="src/blocks.js?version=2020-01-06"></script>
<script type="text/javascript" src="src/threads.js?version=2019-12-19"></script>
<script type="text/javascript" src="src/objects.js?version=2020-01-03"></script>
<script type="text/javascript" src="src/gui.js?version=2020-01-10"></script>
<script type="text/javascript" src="src/objects.js?version=2020-01-11"></script>
<script type="text/javascript" src="src/gui.js?version=2020-01-11"></script>
<script type="text/javascript" src="src/paint.js?version=2019-06-27"></script>
<script type="text/javascript" src="src/lists.js?version=2019-12-08"></script>
<script type="text/javascript" src="src/byob.js?version=2020-01-03"></script>

Wyświetl plik

@ -78,7 +78,7 @@ Animation, BoxMorph, BlockEditorMorph, BlockDialogMorph*/
// Global stuff ////////////////////////////////////////////////////////
modules.gui = '2020-January-10';
modules.gui = '2020-January-11';
// Declarations

Wyświetl plik

@ -84,7 +84,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, BooleanSlotMorph,
localize, TableMorph, TableFrameMorph, normalizeCanvas, VectorPaintEditorMorph,
HandleMorph, AlignmentMorph, Process, XML_Element, WorldMap, copyCanvas*/
modules.objects = '2020-January-03';
modules.objects = '2020-January-11';
var SpriteMorph;
var StageMorph;
@ -11282,9 +11282,18 @@ WatcherMorph.prototype.update = function () {
newValue = Math.round(newValue * 1000000000) / 1000000000;
}
}
if (newValue === undefined) {
// console.log('removing watcher for', this.labelText);
this.destroy();
return;
}
if (newValue !== this.currentValue ||
isInherited !== this.isGhosted ||
(newValue.version && (newValue.version !== this.version))) {
(!isNil(newValue) &&
newValue.version &&
(newValue.version !== this.version)
)
) {
this.changed();
this.cellMorph.contents = newValue;
this.isGhosted = isInherited;