Fossil SCM

Improved layout of graphs with the TIMELINE_DISJOINT property, such as the list of leaves.

drh 2019-07-01 09:30 trunk
Commit 4fc08f94fcc4ed595b78015ed4f8f3420a59708766c4b0ab9f883fbbdd4c1863
1 file changed +2 -1
+2 -1
--- src/graph.c
+++ src/graph.c
@@ -433,10 +433,11 @@
433433
int hasDup = 0; /* True if one or more isDup entries */
434434
const char *zTrunk;
435435
u8 *aMap; /* Copy of p->aiRailMap */
436436
int omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0;
437437
int nTimewarp = 0;
438
+ int riserMargin = (tmFlags & TIMELINE_DISJOINT) ? 0 : RISER_MARGIN;
438439
439440
/* If mergeRiserFrom[X]==Y that means rail X holds a merge riser
440441
** coming up from the bottom of the graph from off-screen check-in Y
441442
** where Y is the RID. There is no riser on rail X if mergeRiserFrom[X]==0.
442443
*/
@@ -577,11 +578,11 @@
577578
if( i==0 && pRow->zBranch!=zTrunk ) continue;
578579
if( pRow->iRail>=0 ) continue;
579580
if( pRow->isDup ) continue;
580581
if( pRow->nParent<0 ) continue;
581582
if( pRow->nParent==0 || hashFind(p,pRow->aParent[0])==0 ){
582
- pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx+RISER_MARGIN, 0);
583
+ pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx+riserMargin, 0);
583584
if( p->mxRail>=GR_MAX_RAIL ) return;
584585
mask = BIT(pRow->iRail);
585586
if( !omitDescenders ){
586587
int n = RISER_MARGIN;
587588
pRow->bDescender = pRow->nParent>0;
588589
--- src/graph.c
+++ src/graph.c
@@ -433,10 +433,11 @@
433 int hasDup = 0; /* True if one or more isDup entries */
434 const char *zTrunk;
435 u8 *aMap; /* Copy of p->aiRailMap */
436 int omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0;
437 int nTimewarp = 0;
 
438
439 /* If mergeRiserFrom[X]==Y that means rail X holds a merge riser
440 ** coming up from the bottom of the graph from off-screen check-in Y
441 ** where Y is the RID. There is no riser on rail X if mergeRiserFrom[X]==0.
442 */
@@ -577,11 +578,11 @@
577 if( i==0 && pRow->zBranch!=zTrunk ) continue;
578 if( pRow->iRail>=0 ) continue;
579 if( pRow->isDup ) continue;
580 if( pRow->nParent<0 ) continue;
581 if( pRow->nParent==0 || hashFind(p,pRow->aParent[0])==0 ){
582 pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx+RISER_MARGIN, 0);
583 if( p->mxRail>=GR_MAX_RAIL ) return;
584 mask = BIT(pRow->iRail);
585 if( !omitDescenders ){
586 int n = RISER_MARGIN;
587 pRow->bDescender = pRow->nParent>0;
588
--- src/graph.c
+++ src/graph.c
@@ -433,10 +433,11 @@
433 int hasDup = 0; /* True if one or more isDup entries */
434 const char *zTrunk;
435 u8 *aMap; /* Copy of p->aiRailMap */
436 int omitDescenders = (tmFlags & TIMELINE_DISJOINT)!=0;
437 int nTimewarp = 0;
438 int riserMargin = (tmFlags & TIMELINE_DISJOINT) ? 0 : RISER_MARGIN;
439
440 /* If mergeRiserFrom[X]==Y that means rail X holds a merge riser
441 ** coming up from the bottom of the graph from off-screen check-in Y
442 ** where Y is the RID. There is no riser on rail X if mergeRiserFrom[X]==0.
443 */
@@ -577,11 +578,11 @@
578 if( i==0 && pRow->zBranch!=zTrunk ) continue;
579 if( pRow->iRail>=0 ) continue;
580 if( pRow->isDup ) continue;
581 if( pRow->nParent<0 ) continue;
582 if( pRow->nParent==0 || hashFind(p,pRow->aParent[0])==0 ){
583 pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx+riserMargin, 0);
584 if( p->mxRail>=GR_MAX_RAIL ) return;
585 mask = BIT(pRow->iRail);
586 if( !omitDescenders ){
587 int n = RISER_MARGIN;
588 pRow->bDescender = pRow->nParent>0;
589

Keyboard Shortcuts

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