Use Zotero.repaint() in callbacks instead of calling Zotero.wait() during translation to reduce non-determinism
This commit is contained in:
parent
23b9d6fdb9
commit
026bce81a8
4 changed files with 4 additions and 9 deletions
|
@ -470,6 +470,8 @@ var Zotero_Browser = new function() {
|
||||||
collection.addItem(dbItem.id);
|
collection.addItem(dbItem.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Zotero.repaint(window);
|
||||||
|
|
||||||
if(Zotero_Browser.isScraping) {
|
if(Zotero_Browser.isScraping) {
|
||||||
// initialize close timer between item saves in case translator doesn't call done
|
// initialize close timer between item saves in case translator doesn't call done
|
||||||
Zotero_Browser.progress.startCloseTimer(10000); // is this long enough?
|
Zotero_Browser.progress.startCloseTimer(10000); // is this long enough?
|
||||||
|
|
|
@ -295,6 +295,7 @@ var Zotero_File_Interface = new function() {
|
||||||
Zotero_File_Interface.Progress.show(
|
Zotero_File_Interface.Progress.show(
|
||||||
Zotero.getString("fileInterface.itemsImported")
|
Zotero.getString("fileInterface.itemsImported")
|
||||||
);
|
);
|
||||||
|
Zotero.repaint(window);
|
||||||
Zotero.DB.beginTransaction();
|
Zotero.DB.beginTransaction();
|
||||||
translation.translate();
|
translation.translate();
|
||||||
} else {
|
} else {
|
||||||
|
@ -616,6 +617,7 @@ var Zotero_File_Interface = new function() {
|
||||||
*/
|
*/
|
||||||
this.updateProgress = function(translate) {
|
this.updateProgress = function(translate) {
|
||||||
Zotero.updateZoteroPaneProgressMeter(translate.getProgress());
|
Zotero.updateZoteroPaneProgressMeter(translate.getProgress());
|
||||||
|
Zotero.repaint(window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,9 +145,6 @@ Zotero.Translate.Sandbox = {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Allow progress meter to update
|
|
||||||
if(!translate.noWait && Zotero.wait) Zotero.wait();
|
|
||||||
|
|
||||||
translate._runHandler("itemSaving", item);
|
translate._runHandler("itemSaving", item);
|
||||||
// pass both the saved item and the original JS array item
|
// pass both the saved item and the original JS array item
|
||||||
translate._runHandler("itemDone", newItem, item);
|
translate._runHandler("itemDone", newItem, item);
|
||||||
|
@ -612,9 +609,6 @@ Zotero.Translate.Sandbox = {
|
||||||
|
|
||||||
translate._runHandler("itemDone", item);
|
translate._runHandler("itemDone", item);
|
||||||
|
|
||||||
// Update progress bar
|
|
||||||
if(!translate.noWait && Zotero.wait) Zotero.wait();
|
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -392,9 +392,6 @@ Zotero.Translate.IO.Read.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
"_initRDF":function() {
|
"_initRDF":function() {
|
||||||
// call Zotero.wait() to do UI repaints
|
|
||||||
Zotero.wait();
|
|
||||||
|
|
||||||
// get URI
|
// get URI
|
||||||
var IOService = Components.classes['@mozilla.org/network/io-service;1']
|
var IOService = Components.classes['@mozilla.org/network/io-service;1']
|
||||||
.getService(Components.interfaces.nsIIOService);
|
.getService(Components.interfaces.nsIIOService);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue