@@ -563,7 +563,7 @@ row_child_add(iContainer *parent, iContainer *child, int pos)
563563 row -> child_rhs = row_get_rhs (row );
564564}
565565
566- static Subcolumn *
566+ Subcolumn *
567567row_get_subcolumn (Row * row )
568568{
569569 return SUBCOLUMN (ICONTAINER (row )-> parent );
@@ -607,7 +607,6 @@ row_parent_add(iContainer *child)
607607
608608 /* Update our context.
609609 */
610- row -> scol = row_get_subcolumn (row );
611610 row -> ws = row_get_workspace (row );
612611 row -> top_row = row_get_root (row );
613612}
@@ -623,7 +622,6 @@ row_parent_remove(iContainer *child)
623622 row_deselect (row );
624623 workspace_queue_layout (row -> ws );
625624
626- row -> scol = NULL ;
627625 row -> ws = NULL ;
628626 row -> top_row = NULL ;
629627
@@ -785,14 +783,16 @@ row_set_to_save(Row *row)
785783 Row * enclosing ;
786784
787785 if (!row -> to_save ) {
786+ Subcolumn * scol = row_get_subcolumn (row );
787+
788788 row -> to_save = TRUE;
789789
790790 /* All peers must be saved. When we reload, we want to keep
791791 * row ordering. If we just save modded row, they'll move to
792792 * the front of the row list on reload, since they'll be made
793793 * first.
794794 */
795- icontainer_map (ICONTAINER (row -> scol ),
795+ icontainer_map (ICONTAINER (scol ),
796796 (icontainer_map_fn ) row_set_to_save , NULL , NULL );
797797
798798 /* All rows back up to the top level must also be saved.
@@ -984,7 +984,6 @@ row_init(Row *row)
984984 printf ("row_init:\n" );
985985#endif /*DEBUG*/
986986
987- row -> scol = NULL ;
988987 row -> child_rhs = NULL ;
989988 row -> ws = NULL ;
990989 row -> top_row = NULL ;
@@ -1177,6 +1176,8 @@ row_link_build2(Expr *expr, Row *row)
11771176static void *
11781177row_link_build (Row * row )
11791178{
1179+ Subcolumn * scol = row_get_subcolumn (row );
1180+
11801181#ifdef DEBUG_LINK
11811182 printf ("row_link_build: " );
11821183 row_name_print (row );
@@ -1185,7 +1186,7 @@ row_link_build(Row *row)
11851186
11861187 /* Build new recomp list. Only for class displays.
11871188 */
1188- if (!row -> scol -> is_top && row -> expr &&
1189+ if (!scol -> is_top && row -> expr &&
11891190 row_link_build2 (row -> expr , row ))
11901191 return row ;
11911192
@@ -1502,11 +1503,11 @@ row_regenerate(Row *row)
15021503 * local classes); the enclosing one should
15031504 * be the same as the most enclosing this.
15041505 */
1505- Row * this = row -> scol -> this ;
1506+ Subcolumn * scol = row_get_subcolumn (row );
1507+ Row * this = scol -> this ;
15061508 gboolean res ;
15071509
1508- res = reduce_regenerate_member (expr ,
1509- & this -> expr -> root , root );
1510+ res = reduce_regenerate_member (expr , & this -> expr -> root , root );
15101511 expr_new_value (expr );
15111512
15121513 if (!res )
@@ -1528,6 +1529,7 @@ static gboolean
15281529row_recomp_row (Row * row )
15291530{
15301531 Rhs * rhs = row -> child_rhs ;
1532+ Subcolumn * scol = row_get_subcolumn (row );
15311533
15321534#ifdef DEBUG
15331535 printf ("row_recomp_row: " );
@@ -1553,7 +1555,7 @@ row_recomp_row(Row *row)
15531555 /* We're about to zap the graph: make sure this tree of rows has a
15541556 * private copy.
15551557 */
1556- if (!subcolumn_make_private (row -> scol ))
1558+ if (!subcolumn_make_private (scol ))
15571559 return FALSE;
15581560
15591561 /* Regenerate from the expr.
@@ -1873,8 +1875,9 @@ row_select_extend(Row *row)
18731875 /* Range select if there was a previous selection, and it was in the
18741876 * same subcolumn.
18751877 */
1876- if (last_select && row -> scol == last_select -> scol ) {
1877- Subcolumn * scol = row -> scol ;
1878+ if (last_select &&
1879+ row_get_subcolumn (row ) == row_get_subcolumn (last_select )) {
1880+ Subcolumn * scol = row_get_subcolumn (row );
18781881 GSList * rows = ICONTAINER (scol )-> children ;
18791882 int pos = g_slist_index (rows , row );
18801883 int pos_last = g_slist_index (rows , last_select );
0 commit comments