Skip to content
Snippets Groups Projects
Commit 7ad388c0 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

save open/closed state of tree nodes

parent 5cd3bcc0
No related branches found
No related tags found
No related merge requests found
...@@ -943,6 +943,10 @@ void onelabWindow::rebuildTree() ...@@ -943,6 +943,10 @@ void onelabWindow::rebuildTree()
int width = (int)(0.5 * _tree->w()); int width = (int)(0.5 * _tree->w());
std::vector<std::string> closed;
for (Fl_Tree_Item *n = _tree->first(); n; n = n->next())
if(n->is_close()) closed.push_back(getPath(n));
_tree->clear(); _tree->clear();
_tree->sortorder(FL_TREE_SORT_ASCENDING); _tree->sortorder(FL_TREE_SORT_ASCENDING);
_tree->selectmode(FL_TREE_SELECT_NONE); _tree->selectmode(FL_TREE_SELECT_NONE);
...@@ -1046,6 +1050,9 @@ void onelabWindow::rebuildTree() ...@@ -1046,6 +1050,9 @@ void onelabWindow::rebuildTree()
} }
} }
for(unsigned int i = 0; i < closed.size(); i++)
_tree->close(closed[i].c_str());
_tree->redraw(); _tree->redraw();
FL_NORMAL_SIZE += _deltaFontSize; FL_NORMAL_SIZE += _deltaFontSize;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment