diff --git a/Viewer/features/base.js b/Viewer/features/base.js index 278722c4..1f026d04 100755 --- a/Viewer/features/base.js +++ b/Viewer/features/base.js @@ -1214,6 +1214,10 @@ core.ImageGridFeatures.Feature({ function(){ this.markChanged('all') }], // data... + ['load', + function(){ + this.data.version_updated + && this.markChanged('all') }], [[ //'load', diff --git a/Viewer/features/filesystem.js b/Viewer/features/filesystem.js index 40e5904d..7839ee49 100755 --- a/Viewer/features/filesystem.js +++ b/Viewer/features/filesystem.js @@ -979,7 +979,11 @@ module.FileSystemLoader = core.ImageGridFeatures.Feature({ var that = this res.then( function(){ - that.markChanged('none') }, + // NOTE: this repeats the functionality in + // base.js' 'edit' feature... + that.data.version_updated ? + that.markChanged('all') + : that.markChanged('none') }, function(){}) } }], // mark everything changed when loading images... ['loadImages', @@ -2549,10 +2553,7 @@ module.FileSystemWriter = core.ImageGridFeatures.Feature({ //this.markChanged('none') var that = this res.then(function(){ - that.markChanged('none') - }) - } - }], + that.markChanged('none') }) } }], ], }) diff --git a/Viewer/imagegrid/data.js b/Viewer/imagegrid/data.js index a4454f8b..bbdf8414 100755 --- a/Viewer/imagegrid/data.js +++ b/Viewer/imagegrid/data.js @@ -2723,7 +2723,14 @@ var DataPrototype = { load: function(data, clean){ var that = this data = typeof(data) == typeof('str') ? JSON.parse(data) : data + var version = data.version data = formats.updateData(data, DATA_VERSION) + + // report version change... + delete this.version_updated + if(data.version != version){ + this.version_updated = true } + this.order = data.order.slice() this.ribbon_order = data.ribbon_order.slice()