fix(tools.ts): sync with active tools when no saved state
Hook was showing all tools as enabled even though only 4 were active. Now initializes from pi.getActiveTools() to match actual state.
This commit is contained in:
@@ -57,8 +57,8 @@ export default function toolsHook(pi: HookAPI) {
|
|||||||
enabledTools = new Set(savedTools.filter((t: string) => allTools.includes(t)));
|
enabledTools = new Set(savedTools.filter((t: string) => allTools.includes(t)));
|
||||||
applyTools();
|
applyTools();
|
||||||
} else {
|
} else {
|
||||||
// No saved state - enable all tools by default
|
// No saved state - sync with currently active tools
|
||||||
enabledTools = new Set(allTools);
|
enabledTools = new Set(pi.getActiveTools());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user