Skip to content

Commit 1196e29

Browse files
matthijslnmprins
authored andcommitted
HTM-1729: Fix auto-enable map tools not activated when disabling map tool which was not active
1 parent fc903da commit 1196e29

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/map/src/lib/openlayers-map/open-layers-tool-manager.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ export class OpenLayersToolManager implements ToolManagerModel {
8686
}
8787

8888
public disableTool(toolId: string, preventAutoEnableTools?: boolean): ToolManagerModel {
89+
if (!preventAutoEnableTools && !this.switchedTool) {
90+
this.enableAutoEnabledTools();
91+
}
8992
if (!this.tools.get(toolId)?.isActive) {
9093
return this;
9194
}
9295
this.tools.get(toolId)?.disable();
93-
if (!preventAutoEnableTools && !this.switchedTool) {
94-
this.enableAutoEnabledTools();
95-
}
9696
this.toolsDisabled.next(null);
9797
return this;
9898
}

0 commit comments

Comments
 (0)