fixed a really odd bug...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-10-03 04:34:19 +03:00
parent dc510d4ae8
commit eb31e84d71
2 changed files with 11 additions and 11 deletions

View File

@ -921,11 +921,7 @@ var ChangesActions = actions.Actions({
// all... // all...
if(args.length == 1 && args[0] == 'all'){ if(args.length == 1 && args[0] == 'all'){
// NOTE: this is better than delete as it will shadow this.changes = true
// the parent's changes in case we got cloned from
// a live instance...
//delete this.changes
this.changes = null
// none... // none...
} else if(args.length == 1 && args[0] == 'none'){ } else if(args.length == 1 && args[0] == 'none'){

View File

@ -770,13 +770,18 @@ module.FileSystemLoader = core.ImageGridFeatures.Feature({
['loadIndex', ['loadIndex',
function(res, path){ function(res, path){
if(path){ if(path){
//this.markChanged('none')
var that = this var that = this
res.then(function(){ res.then(function(){
that.markChanged('none') that.markChanged('none') })
})
} }
}], }],
// mark everything changed when loading images...
['loadImages',
function(res){
var that = this
res.then(function(){
that.markChanged('all') })
}],
// add new images to changes... // add new images to changes...
['loadNewImages', ['loadNewImages',
function(res){ function(res){
@ -786,8 +791,7 @@ module.FileSystemLoader = core.ImageGridFeatures.Feature({
&& imgs.length > 0 && imgs.length > 0
&& that && that
.markChanged('data') .markChanged('data')
.markChanged(imgs.keys()) .markChanged(imgs.keys()) })
})
}], }],
], ],
}) })