| | @@ -372,17 +372,24 @@ |
| 372 | 372 | ** |
| 373 | 373 | ** When primary or merge parents are off-screen, normally a line is drawn |
| 374 | 374 | ** from the node down to the bottom of the graph. This line is called a |
| 375 | 375 | ** "descender". But if the omitDescenders flag is true, then lines down |
| 376 | 376 | ** to the bottom of the screen are omitted. |
| 377 | +** |
| 378 | +** The tmFlags parameter is zero or more of the TIMELINE_* constants. |
| 379 | +** Only the following are honored: |
| 380 | +** |
| 381 | +** TIMELINE_DISJOINT: Omit descenders |
| 382 | +** TIMELINE_FILLGAPS: Use step-children |
| 377 | 383 | */ |
| 378 | | -void graph_finish(GraphContext *p, int omitDescenders){ |
| 384 | +void graph_finish(GraphContext *p, u32 tmFlags){ |
| 379 | 385 | GraphRow *pRow, *pDesc, *pDup, *pLoop, *pParent; |
| 380 | 386 | int i, j; |
| 381 | 387 | u64 mask; |
| 382 | 388 | int hasDup = 0; /* True if one or more isDup entries */ |
| 383 | 389 | const char *zTrunk; |
| 390 | + int omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0; |
| 384 | 391 | |
| 385 | 392 | /* If mergeRiserFrom[X]==Y that means rail X holds a merge riser |
| 386 | 393 | ** coming up from the bottom of the graph from off-screen check-in Y |
| 387 | 394 | ** where Y is the RID. There is no riser on rail X if mergeRiserFrom[X]==0. |
| 388 | 395 | */ |
| | @@ -479,26 +486,28 @@ |
| 479 | 486 | pParent->pChild = pRow; |
| 480 | 487 | pParent->idxTop = pRow->idxTop; |
| 481 | 488 | } |
| 482 | 489 | } |
| 483 | 490 | |
| 484 | | - /* If a node has no pChild, and there is a later node (a node higher |
| 485 | | - ** up on the graph) in the same branch that has no parent, then make |
| 486 | | - ** the lower node a step-child of the upper node. |
| 487 | | - */ |
| 488 | | - for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 489 | | - if( pRow->pChild ) continue; |
| 490 | | - for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){ |
| 491 | | - if( pLoop->nParent>0 |
| 492 | | - && pLoop->zBranch==pRow->zBranch |
| 493 | | - && hashFind(p,pLoop->aParent[0])==0 |
| 494 | | - ){ |
| 495 | | - pRow->pChild = pLoop; |
| 496 | | - pRow->idxTop = pLoop->idxTop; |
| 497 | | - pRow->isStepParent = 1; |
| 498 | | - pLoop->aParent[0] = pRow->rid; |
| 499 | | - break; |
| 491 | + if( tmFlags & TIMELINE_FILLGAPS ){ |
| 492 | + /* If a node has no pChild, and there is a later node (a node higher |
| 493 | + ** up on the graph) in the same branch that has no parent, then make |
| 494 | + ** the lower node a step-child of the upper node. |
| 495 | + */ |
| 496 | + for(pRow=p->pFirst; pRow; pRow=pRow->pNext){ |
| 497 | + if( pRow->pChild ) continue; |
| 498 | + for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){ |
| 499 | + if( pLoop->nParent>0 |
| 500 | + && pLoop->zBranch==pRow->zBranch |
| 501 | + && hashFind(p,pLoop->aParent[0])==0 |
| 502 | + ){ |
| 503 | + pRow->pChild = pLoop; |
| 504 | + pRow->idxTop = pLoop->idxTop; |
| 505 | + pRow->isStepParent = 1; |
| 506 | + pLoop->aParent[0] = pRow->rid; |
| 507 | + break; |
| 508 | + } |
| 500 | 509 | } |
| 501 | 510 | } |
| 502 | 511 | } |
| 503 | 512 | |
| 504 | 513 | /* Identify rows where the primary parent is off screen. Assign |
| 505 | 514 | |