BF: Tool manager was not enabling tools if any viewport was empty
This commit is contained in:
parent
f4b2e6a33b
commit
e5ad7e15a7
@ -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) {
|
if (!activeTool) {
|
||||||
activeTool = defaultTool;
|
activeTool = defaultTool;
|
||||||
}
|
}
|
||||||
@ -515,6 +508,10 @@ export const toolManager = {
|
|||||||
|
|
||||||
// Otherwise, set the active tool for all viewport elements
|
// Otherwise, set the active tool for all viewport elements
|
||||||
$elements.each((index, element) => {
|
$elements.each((index, element) => {
|
||||||
|
if (checkElementEnabled(element) === false) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
toolManager.setActiveToolForElement(toolId, element, button);
|
toolManager.setActiveToolForElement(toolId, element, button);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user