diff --git a/ui (gen4)/features/base.js b/ui (gen4)/features/base.js index 4b4dee98..b04402ff 100755 --- a/ui (gen4)/features/base.js +++ b/ui (gen4)/features/base.js @@ -921,6 +921,20 @@ module.Base = core.ImageGridFeatures.Feature({ ], function(_, target){ this.markChanged('images', [this.data.getImage(target)]) }], + ['prepareIndexForWrite', + function(res){ + res.index.current = res.raw.data.current + + // XXX .data + // XXX .images + }], + ['prepareJSONForLoad', + function(res, json){ + res.data.current = json.current || res.data.current + + // XXX .data + // XXX .images + }], ], }) diff --git a/ui (gen4)/imagegrid/file.js b/ui (gen4)/imagegrid/file.js index fa258915..39d5afa0 100755 --- a/ui (gen4)/imagegrid/file.js +++ b/ui (gen4)/imagegrid/file.js @@ -795,10 +795,6 @@ module.buildIndex = function(index, base_path){ // buildup the data object... // NOTE: this is mostly to attach stuff that is stored in separate files... - // .current... - d.current = index.current || d.current - - // images... // XXX there seems to be a problem with updated images... // - in the test set not all rotated manually images are loaded rotated... @@ -892,10 +888,7 @@ function(json, changes){ : changes == null ? true : changes - // always save current... - var res = { - current: json.data.current, - } + var res = {} // data... if(changes === true || changes && changes.data){