Skip to content

Commit

Permalink
Some review changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
D8H committed Apr 29, 2024
1 parent 9860c9c commit 02314a2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion newIDE/app/src/EventsSheet/index.js
Expand Up @@ -1943,7 +1943,7 @@ export class EventsSheetComponentWithoutHandle extends React.Component<
}
onParameterClick={this.openParameterEditor}
onVariableDeclarationClick={() => {
//TODO
// Nothing to do.
}}
onVariableDeclarationDoubleClick={this.openVariablesEditor}
onEventClick={this.selectEvent}
Expand Down
2 changes: 1 addition & 1 deletion newIDE/app/src/UI/Theme/Global/EventsSheet.css
Expand Up @@ -93,7 +93,7 @@
padding-left: 5px;
padding-right: 5px;
/* Prevent container to growing outside its parent. We don't have a way to prevent an infinitely
* small action column, but responsive design should avoid the problem on small screens. */
* small variables column, but responsive design should avoid the problem on small screens. */
min-width: 0;
}

Expand Down
14 changes: 8 additions & 6 deletions newIDE/app/src/VariablesList/VariablesList.js
Expand Up @@ -540,13 +540,15 @@ const VariablesList = (props: Props) => {
);
const setSelectedNodes = React.useCallback(
(nodes: Array<string> | ((nodes: Array<string>) => Array<string>)) => {
nodes = Array.isArray(nodes) ? nodes : nodes(selectedNodes);
doSetSelectedNodes(nodes);
if (onSelectedVariableChange) {
onSelectedVariableChange(nodes);
}
doSetSelectedNodes(selectedNodes => {
const newNodes = Array.isArray(nodes) ? nodes : nodes(selectedNodes);
if (onSelectedVariableChange) {
onSelectedVariableChange(newNodes);
}
return newNodes;
});
},
[onSelectedVariableChange, selectedNodes]
[onSelectedVariableChange]
);

const [searchMatchingNodes, setSearchMatchingNodes] = React.useState<
Expand Down

0 comments on commit 02314a2

Please sign in to comment.