Tool currentTool = EditManager.INSTANCE.getActiveTool();
if (currentTool != null && currentTool instanceof InfoTool) {
EditManager.INSTANCE.setActiveTool(null);
} else {
try {
<BUG>final Collection<SpatialVectorTable> spatialTables = SpatialiteSourcesManager.INSTANCE.getSpatialiteMaps2TablesMap().values();
</BUG>
boolean atLeastOneEnabled = false;
<BUG>for (SpatialVectorTable spatialVectorTable : spatialTables) {
if (spatialVectorTable.getStyle().enabled == 1) {
atLeastOneEnabled = true;</BUG>
break;

Tool currentTool = EditManager.INSTANCE.getActiveTool();
if (currentTool != null && currentTool instanceof InfoTool) {
EditManager.INSTANCE.setActiveTool(null);
} else {
try {
HashMap<SpatialiteMap, SpatialVectorTable> spatialiteMaps2TablesMap = SpatialiteSourcesManager.INSTANCE.getSpatialiteMaps2TablesMap();
boolean atLeastOneEnabled = false;
for (Map.Entry<SpatialiteMap, SpatialVectorTable> entry : spatialiteMaps2TablesMap.entrySet()) {
if (entry.getKey().isVisible) {
atLeastOneEnabled = true;
break;
