Fossil SCM

Fix a bug in the graph display that causes an assertion fault if the timeline contains a node that has no parents.

drh 2010-02-08 16:40 trunk
Commit c5f3e87bb0e1198ac37a7d09b4202de86eebb838
1 file changed +2 -2
+2 -2
--- src/graph.c
+++ src/graph.c
@@ -207,13 +207,13 @@
207207
208208
/* Identify rows where the primary parent is off screen. Assign
209209
** each to a rail and draw descenders to the bottom of the screen.
210210
*/
211211
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
212
- if( pRow->nParent>0 && !bag_find(&allRids,pRow->aParent[0]) ){
212
+ if( pRow->nParent==0 || !bag_find(&allRids,pRow->aParent[0]) ){
213213
pRow->iRail = ++p->mxRail;
214
- pRow->bDescender = 1;
214
+ pRow->bDescender = pRow->nParent>0;
215215
mask = 1<<(pRow->iRail);
216216
for(pDesc=pRow; pDesc; pDesc=pDesc->pNext){
217217
pDesc->railInUse |= mask;
218218
}
219219
}
220220
--- src/graph.c
+++ src/graph.c
@@ -207,13 +207,13 @@
207
208 /* Identify rows where the primary parent is off screen. Assign
209 ** each to a rail and draw descenders to the bottom of the screen.
210 */
211 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
212 if( pRow->nParent>0 && !bag_find(&allRids,pRow->aParent[0]) ){
213 pRow->iRail = ++p->mxRail;
214 pRow->bDescender = 1;
215 mask = 1<<(pRow->iRail);
216 for(pDesc=pRow; pDesc; pDesc=pDesc->pNext){
217 pDesc->railInUse |= mask;
218 }
219 }
220
--- src/graph.c
+++ src/graph.c
@@ -207,13 +207,13 @@
207
208 /* Identify rows where the primary parent is off screen. Assign
209 ** each to a rail and draw descenders to the bottom of the screen.
210 */
211 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
212 if( pRow->nParent==0 || !bag_find(&allRids,pRow->aParent[0]) ){
213 pRow->iRail = ++p->mxRail;
214 pRow->bDescender = pRow->nParent>0;
215 mask = 1<<(pRow->iRail);
216 for(pDesc=pRow; pDesc; pDesc=pDesc->pNext){
217 pDesc->railInUse |= mask;
218 }
219 }
220

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button