Commit fcb780d5 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

problem with annotators in class tree branches that were truncated

parent 0074da66
......@@ -547,6 +547,10 @@ ChooseAnnotatorsDialog.prototype.getParameterName = function (parameter) {
* @param {User} user
*/
ChooseAnnotatorsDialog.prototype.copyAnnotatorsToChildren = function (from, to, user) {
if (user.getPreferences()._elementAnnotators[from.className] === undefined) {
logger.warn("Cannot copy annotator from " + from.className + " to " + to.className + ". Annotators don't exist");
user.getPreferences()._elementAnnotators[from.className] = user.getPreferences()._elementAnnotators[to.className];
}
user.getPreferences()._elementAnnotators[to.className] = user.getPreferences()._elementAnnotators[from.className];
};
module.exports = ChooseAnnotatorsDialog;
......@@ -58,5 +58,9 @@ describe('UserPreferences', function () {
});
});
it("toExport", function () {
return ServerConnector.getLoggedUser().then(function (user) {
assert.ok(user.getPreferences().toExport());
})
});
});
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment