Skip to content

Commit

Permalink
[4549] Filter edge tools from palette tool sections
Browse files Browse the repository at this point in the history
Bug: #4549
Signed-off-by: Michaël Charfadi <[email protected]>
  • Loading branch information
mcharfadi authored and sbegaudeau committed Feb 14, 2025
1 parent a0dd9bd commit b6f653d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Now they are executed for some data if the data was coming from a studio too.
- https://github.com/eclipse-sirius/sirius-web/issues/4547[#4547] [vs-code] Adapt the VSCode extension to the use of SemanticData#id as editingContextId
- https://github.com/eclipse-sirius/sirius-web/issues/4561[#4561] [sirius-web] Display boolean values properly in the query view
- https://github.com/eclipse-sirius/sirius-web/issues/4522[#4522] [diagram] Fix an issue where custom tools were no longer contributed to the diagram palette
- https://github.com/eclipse-sirius/sirius-web/issues/4549[#4549] [diagram] Fix an issue where edge tools could be shown in a palette tool section


=== New Features
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2024 Obeo.
* Copyright (c) 2024, 2025 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand All @@ -16,6 +16,7 @@ import ListItemButton from '@mui/material/ListItemButton';
import ListItemText from '@mui/material/ListItemText';
import Tooltip from '@mui/material/Tooltip';
import { makeStyles } from 'tss-react/mui';
import { isSingleClickOnDiagramElementTool } from '../Palette';
import { ToolListItem } from '../tool-list-item/ToolListItem';
import { PaletteToolSectionListProps } from './PaletteToolSectionList.types';

Expand Down Expand Up @@ -68,7 +69,7 @@ export const PaletteToolSectionList = ({ toolSection, onToolClick, onBackToMainL
<ListItemText className={classes.sectionTitleListItemText} primary={toolSection.label} />
</ListItemButton>
</Tooltip>
{toolSection.tools.map((tool) => (
{toolSection.tools.filter(isSingleClickOnDiagramElementTool).map((tool) => (
<ToolListItem onToolClick={onToolClick} tool={tool} key={tool.id} />
))}
</List>
Expand Down

0 comments on commit b6f653d

Please sign in to comment.