aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-tree-table-adapter.c3
-rw-r--r--widgets/table/e-tree.c14
2 files changed, 13 insertions, 4 deletions
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index f02494c4e1..99c312c805 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -928,6 +928,9 @@ void e_tree_table_adapter_node_set_expanded (ETreeTableAdapter *etta, ET
ETreeTableAdapterNode *node;
int row;
+ if (e_tree_model_node_is_root (etta->priv->source, path) && !etta->priv->root_visible)
+ return;
+
node = find_or_create_node(etta, path);
row = find_row_num(etta, path);
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 4af1cc2dab..1c45afa7ef 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -555,14 +555,20 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
break;
case '=':
case GDK_Right:
- path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
- e_tree_table_adapter_node_set_expanded (et->priv->etta, path, TRUE);
+ if (row != -1) {
+ path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
+ if (path)
+ e_tree_table_adapter_node_set_expanded (et->priv->etta, path, TRUE);
+ }
return_val = 1;
break;
case '-':
case GDK_Left:
- path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
- e_tree_table_adapter_node_set_expanded (et->priv->etta, path, FALSE);
+ if (row != -1) {
+ path = e_tree_table_adapter_node_at_row(et->priv->etta, row);
+ if (path)
+ e_tree_table_adapter_node_set_expanded (et->priv->etta, path, FALSE);
+ }
return_val = 1;
break;
default: