Fix bug with brush tool dissapearing when collpased
This commit is contained in:
parent
8c92d19b9c
commit
17043745de
@ -13,8 +13,9 @@ function ToolSection({ collapse, tools, onToolClick }) {
|
||||
if (selectedTool) {
|
||||
setCollapsedTool(selectedTool);
|
||||
} else {
|
||||
setCollapsedTool(
|
||||
(prevTool) => prevTool && { ...prevTool, isSelected: false }
|
||||
// No selected tool, deselect if we have a tool or get the first tool if not
|
||||
setCollapsedTool((prevTool) =>
|
||||
prevTool ? { ...prevTool, isSelected: false } : tools[0]
|
||||
);
|
||||
}
|
||||
}, [tools]);
|
||||
|
Loading…
Reference in New Issue
Block a user