From 3ad813be9e861cb8e03ce4852f36350023df7477 Mon Sep 17 00:00:00 2001 From: Leonardo Campos Date: Sat, 4 Mar 2017 00:39:00 -0300 Subject: [PATCH] OHIF-156: Clicking the active tool icon should not reset to the default tool --- .../viewer/toolbarSectionButton/toolbarSectionButton.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Packages/ohif-viewerbase/client/components/viewer/toolbarSectionButton/toolbarSectionButton.js b/Packages/ohif-viewerbase/client/components/viewer/toolbarSectionButton/toolbarSectionButton.js index 1d8d88522..a747dcae2 100644 --- a/Packages/ohif-viewerbase/client/components/viewer/toolbarSectionButton/toolbarSectionButton.js +++ b/Packages/ohif-viewerbase/client/components/viewer/toolbarSectionButton/toolbarSectionButton.js @@ -76,11 +76,7 @@ Template.toolbarSectionButton.events({ const elements = instance.$('.imageViewerViewport'); const activeTool = toolManager.getActiveTool(); - if (tool === activeTool) { - const defaultTool = toolManager.getDefaultTool(); - OHIF.log.info('Setting active tool to: ' + defaultTool); - toolManager.setActiveTool(defaultTool, elements); - } else { + if (tool !== activeTool) { OHIF.log.info('Setting active tool to: ' + tool); toolManager.setActiveTool(tool, elements); }