File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
MigraDocCore.DocumentObjectModel/MigraDoc.DocumentObjectModel.Tables Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,12 @@ public int Index
117
117
{
118
118
if ( ! index . HasValue )
119
119
{
120
- Columns clms = this . Parent as Columns ;
121
- SetValue ( "Index" , index = clms . IndexOf ( this ) ) ;
120
+ Columns clms = ( Columns ) Parent ;
121
+ // One for all and all for one.
122
+ for ( int i = 0 ; i < clms . Count ; ++ i )
123
+ {
124
+ clms [ i ] . index = i ;
125
+ }
122
126
}
123
127
return index ?? 0 ;
124
128
}
Original file line number Diff line number Diff line change @@ -123,8 +123,12 @@ public int Index
123
123
{
124
124
if ( ! index . HasValue )
125
125
{
126
- Rows rws = this . parent as Rows ;
127
- SetValue ( "Index" , index = rws . IndexOf ( this ) ) ;
126
+ Rows rws = ( Rows ) parent ;
127
+ // One for all and all for one.
128
+ for ( int i = 0 ; i < rws . Count ; ++ i )
129
+ {
130
+ rws [ i ] . index = i ;
131
+ }
128
132
}
129
133
return index ?? 0 ;
130
134
}
You can’t perform that action at this time.
0 commit comments