diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-07 16:33:49 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-07 16:33:49 +0000 |
commit | 792f35a28c4b528bc819fa4d30976c2cf84393c1 (patch) | |
tree | cd65b0897efde6ef949ab9223e0daba3273e3041 /ui/qt/proto_tree.cpp | |
parent | cd7712fd2f3064945ce001e1d82109852c3b3191 (diff) |
Make tree_is_expanded array static, add setter/getter function.
svn path=/trunk/; revision=50433
Diffstat (limited to 'ui/qt/proto_tree.cpp')
-rw-r--r-- | ui/qt/proto_tree.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/qt/proto_tree.cpp b/ui/qt/proto_tree.cpp index c63b26a149..1dcec3b5b1 100644 --- a/ui/qt/proto_tree.cpp +++ b/ui/qt/proto_tree.cpp @@ -140,7 +140,7 @@ proto_tree_draw_node(proto_node *node, gpointer data) } if (is_branch) { - if (tree_is_expanded[fi->tree_type]) { + if (tree_expanded(fi->tree_type)) { item->setExpanded(true); } else { item->setExpanded(false); @@ -334,7 +334,7 @@ void ProtoTree::expand(const QModelIndex & index) { if (fi->tree_type != -1) { g_assert(fi->tree_type >= 0 && fi->tree_type < num_tree_types); - tree_is_expanded[fi->tree_type] = TRUE; + tree_expanded_set(fi->tree_type, TRUE); } } @@ -351,7 +351,7 @@ void ProtoTree::collapse(const QModelIndex & index) { if (fi->tree_type != -1) { g_assert(fi->tree_type >= 0 && fi->tree_type < num_tree_types); - tree_is_expanded[fi->tree_type] = FALSE; + tree_expanded_set(fi->tree_type, FALSE); } } @@ -388,7 +388,7 @@ void ProtoTree::expandAll() { int i; for(i=0; i < num_tree_types; i++) { - tree_is_expanded[i] = TRUE; + tree_expanded_set(i, TRUE); } QTreeWidget::expandAll(); } @@ -397,7 +397,7 @@ void ProtoTree::collapseAll() { int i; for(i=0; i < num_tree_types; i++) { - tree_is_expanded[i] = FALSE; + tree_expanded_set(i, FALSE); } QTreeWidget::collapseAll(); } |