Fossil SCM

Another place where checking for pRow->isLeaf is too simple (which could result in more phantom up-arrows)

jan.nijtmans 2016-07-05 14:47 trunk
Commit 8ce629f916c615f8f041aa3e219f727cff11b29c
1 file changed +2 -4
+2 -4
--- src/graph.c
+++ src/graph.c
@@ -474,13 +474,11 @@
474474
for(pRow=p->pLast; pRow; pRow=pRow->pPrev){
475475
int parentRid;
476476
477477
if( pRow->iRail>=0 ){
478478
if( pRow->pChild==0 && !pRow->timeWarp ){
479
- if( omitDescenders || count_nonbranch_children(pRow->rid)==0 ){
480
- /* no-op */
481
- }else{
479
+ if( !omitDescenders && count_nonbranch_children(pRow->rid)!=0 ){
482480
riser_to_top(pRow);
483481
}
484482
}
485483
continue;
486484
}
@@ -519,11 +517,11 @@
519517
}
520518
mask = BIT(pRow->iRail);
521519
pRow->railInUse |= mask;
522520
if( pRow->pChild ){
523521
assignChildrenToRail(pRow);
524
- }else if( !pRow->isLeaf && !omitDescenders ){
522
+ }else if( !omitDescenders && count_nonbranch_children(pRow->rid)!=0 ){
525523
riser_to_top(pRow);
526524
}
527525
if( pParent ){
528526
for(pLoop=pParent->pPrev; pLoop && pLoop!=pRow; pLoop=pLoop->pPrev){
529527
pLoop->railInUse |= mask;
530528
--- src/graph.c
+++ src/graph.c
@@ -474,13 +474,11 @@
474 for(pRow=p->pLast; pRow; pRow=pRow->pPrev){
475 int parentRid;
476
477 if( pRow->iRail>=0 ){
478 if( pRow->pChild==0 && !pRow->timeWarp ){
479 if( omitDescenders || count_nonbranch_children(pRow->rid)==0 ){
480 /* no-op */
481 }else{
482 riser_to_top(pRow);
483 }
484 }
485 continue;
486 }
@@ -519,11 +517,11 @@
519 }
520 mask = BIT(pRow->iRail);
521 pRow->railInUse |= mask;
522 if( pRow->pChild ){
523 assignChildrenToRail(pRow);
524 }else if( !pRow->isLeaf && !omitDescenders ){
525 riser_to_top(pRow);
526 }
527 if( pParent ){
528 for(pLoop=pParent->pPrev; pLoop && pLoop!=pRow; pLoop=pLoop->pPrev){
529 pLoop->railInUse |= mask;
530
--- src/graph.c
+++ src/graph.c
@@ -474,13 +474,11 @@
474 for(pRow=p->pLast; pRow; pRow=pRow->pPrev){
475 int parentRid;
476
477 if( pRow->iRail>=0 ){
478 if( pRow->pChild==0 && !pRow->timeWarp ){
479 if( !omitDescenders && count_nonbranch_children(pRow->rid)!=0 ){
 
 
480 riser_to_top(pRow);
481 }
482 }
483 continue;
484 }
@@ -519,11 +517,11 @@
517 }
518 mask = BIT(pRow->iRail);
519 pRow->railInUse |= mask;
520 if( pRow->pChild ){
521 assignChildrenToRail(pRow);
522 }else if( !omitDescenders && count_nonbranch_children(pRow->rid)!=0 ){
523 riser_to_top(pRow);
524 }
525 if( pParent ){
526 for(pLoop=pParent->pPrev; pLoop && pLoop!=pRow; pLoop=pLoop->pPrev){
527 pLoop->railInUse |= mask;
528

Keyboard Shortcuts

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