LT-290 Disable Lesion Tracker tool buttons if the opened study is not associated

- Fix the bug with temp lesion when the study is not associated
This commit is contained in:
Evren Ozkan authored and Erik Ziegler committed 2016-11-15 08:24:30 +01:00
1 parent 7fa242d0aa
commit 5cbf08ea4f
5 files changed
+54 -9

No files matched your search

@@ -41,3 +41,21 @@ OHIF.lesiontracker.toggleLesionTrackerTools = () => {
toolsShown = true;
}
};
OHIF.lesiontracker.toggleLesionTrackerToolsButtons = (isEnabled) => {
const toolStates = previousStates || toolManager.getToolDefaultStates();
if (isEnabled) {
toolStates.disabledToolButtons = [];
} else {
toolStates.disabledToolButtons = [ 'bidirectional', 'nonTarget', 'crTool', 'unTool', 'exTool', 'toggleHUD', 'toggleTrial', 'toolbarSectionEntry' ];
}
// Reload the updated previous or default states
toolManager.setToolDefaultStates(toolStates);
// Reset the active tool if disabled
if (!isEnabled) {
toolManager.setActiveTool();
}
};