BF: Tool manager was not enabling tools if any viewport was empty

This commit is contained in:
Erik Ziegler 2018-02-15 13:41:51 +01:00
parent f4b2e6a33b
commit e5ad7e15a7

View File

@ -479,13 +479,6 @@ export const toolManager = {
}
};
if ($elements.toArray().reduce(checkElementEnabled, false)) {
// if at least one element is not enabled, we do not activate tool.
OHIF.log.info(`Could not activate tool ${toolId} due to a viewport not being enabled. Try again later.`);
return;
}
if (!activeTool) {
activeTool = defaultTool;
}
@ -515,6 +508,10 @@ export const toolManager = {
// Otherwise, set the active tool for all viewport elements
$elements.each((index, element) => {
if (checkElementEnabled(element) === false) {
return;
}
toolManager.setActiveToolForElement(toolId, element, button);
});