From ef10c17fc3d79570efbda63a17124bd904fd738c Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 13 Feb 2014 18:59:44 +0400 Subject: [PATCH] bugfix in tags... Signed-off-by: Alex A. Naanou --- ui/tags.js | 18 +++++++++++------- ui/ui.js | 2 ++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ui/tags.js b/ui/tags.js index b38835ca..78d35183 100755 --- a/ui/tags.js +++ b/ui/tags.js @@ -202,7 +202,7 @@ function updateTags(tags, gid, tagset, images){ function tagSelectAND(tags, from, no_sort, tagset){ tags = typeof(tags) == typeof('str') ? [ tags ] : tags tagset = tagset == null ? TAGS : tagset - from = from == null ? getLoadedGIDs() : from + from = from == null ? getLoadedGIDs() : getLoadedGIDs(from) // special case: a single tag... // NOTE: this is significantly faster. @@ -300,15 +300,19 @@ function tagSelectOR(tags, from, no_sort, tagset){ */ function tagList(list, tags){ - list.forEach(function(gid){ - addTag(tags, gid) - }) + list = getLoadedGIDs(list) + list + .forEach(function(gid){ + addTag(tags, gid) + }) return list } function untagList(list, tags){ - list.forEach(function(gid){ - removeTag(tags, gid) - }) + list = getLoadedGIDs(list) + list + .forEach(function(gid){ + removeTag(tags, gid) + }) return list } // same as tagList(..), but will also remove the tags form gids no in diff --git a/ui/ui.js b/ui/ui.js index 76007177..2e113541 100755 --- a/ui/ui.js +++ b/ui/ui.js @@ -570,6 +570,8 @@ function progressBar(name, container, close, hide_timeout, auto_remove){ setTimeout(function(){ widget.hide() + // XXX this is not a good way to go... + // need a clean way to reset... if(auto_remove){ widget.remove() }