Clear skill tree state when initializing tree

pull/5195/head
hunteraraujo 2023-09-10 15:12:52 -07:00
parent f85dd1b09b
commit e1a5a2a481
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@ class SkillTreeViewModel extends ChangeNotifier {
void initializeSkillTree() {
_skillTreeNodes = [];
_skillTreeEdges = [];
_selectedNode = null;
graph.nodes.clear();
graph.edges.clear();
// Add nodes to _skillTreeNodes
_skillTreeNodes.addAll([