Fossil SCM

Improvements to the merge-out arrows on the graph. It is now more likely to draw the merge arrow up out of a leaf node.

drh 2010-12-30 21:26 trunk
Commit 4614dadbcb9c3b0b71f70dac84e03ed88c2c2124
1 file changed +4 -6
+4 -6
--- src/graph.c
+++ src/graph.c
@@ -45,14 +45,14 @@
4545
int idxTop; /* Direct descendent highest up on the graph */
4646
GraphRow *pChild; /* Child immediately above this node */
4747
u8 isDup; /* True if this is duplicate of a prior entry */
4848
u8 bDescender; /* True if riser from bottom of graph to here. */
4949
i8 iRail; /* Which rail this check-in appears on. 0-based.*/
50
- i8 mergeOut; /* Merge out to this rail */
50
+ i8 mergeOut; /* Merge out to this rail. -1 if no merge-out */
5151
int aiRiser[GR_MAX_RAIL]; /* Risers from this node to a higher row. */
52
- u32 mergeIn; /* Merge in from other rails */
53
- int mergeUpto; /* Draw the merge rail up to this level */
52
+ u32 mergeIn; /* Merge in from other rails on this bitmask */
53
+ int mergeUpto; /* Draw the mergeOut rail up to this level */
5454
u32 mergeDown; /* Draw merge lines up from bottom of graph */
5555
5656
u32 railInUse; /* Mask of occupied rails at this row */
5757
};
5858
@@ -343,13 +343,11 @@
343343
pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx, 0, 0);
344344
}else{
345345
pRow->iRail = ++p->mxRail;
346346
}
347347
mask = 1<<(pRow->iRail);
348
- if( omitDescenders ){
349
- if( pRow->pNext ) pRow->pNext->railInUse |= mask;
350
- }else{
348
+ if( !omitDescenders ){
351349
pRow->bDescender = pRow->nParent>0;
352350
for(pLoop=pRow; pLoop; pLoop=pLoop->pNext){
353351
pLoop->railInUse |= mask;
354352
}
355353
}
356354
--- src/graph.c
+++ src/graph.c
@@ -45,14 +45,14 @@
45 int idxTop; /* Direct descendent highest up on the graph */
46 GraphRow *pChild; /* Child immediately above this node */
47 u8 isDup; /* True if this is duplicate of a prior entry */
48 u8 bDescender; /* True if riser from bottom of graph to here. */
49 i8 iRail; /* Which rail this check-in appears on. 0-based.*/
50 i8 mergeOut; /* Merge out to this rail */
51 int aiRiser[GR_MAX_RAIL]; /* Risers from this node to a higher row. */
52 u32 mergeIn; /* Merge in from other rails */
53 int mergeUpto; /* Draw the merge rail up to this level */
54 u32 mergeDown; /* Draw merge lines up from bottom of graph */
55
56 u32 railInUse; /* Mask of occupied rails at this row */
57 };
58
@@ -343,13 +343,11 @@
343 pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx, 0, 0);
344 }else{
345 pRow->iRail = ++p->mxRail;
346 }
347 mask = 1<<(pRow->iRail);
348 if( omitDescenders ){
349 if( pRow->pNext ) pRow->pNext->railInUse |= mask;
350 }else{
351 pRow->bDescender = pRow->nParent>0;
352 for(pLoop=pRow; pLoop; pLoop=pLoop->pNext){
353 pLoop->railInUse |= mask;
354 }
355 }
356
--- src/graph.c
+++ src/graph.c
@@ -45,14 +45,14 @@
45 int idxTop; /* Direct descendent highest up on the graph */
46 GraphRow *pChild; /* Child immediately above this node */
47 u8 isDup; /* True if this is duplicate of a prior entry */
48 u8 bDescender; /* True if riser from bottom of graph to here. */
49 i8 iRail; /* Which rail this check-in appears on. 0-based.*/
50 i8 mergeOut; /* Merge out to this rail. -1 if no merge-out */
51 int aiRiser[GR_MAX_RAIL]; /* Risers from this node to a higher row. */
52 u32 mergeIn; /* Merge in from other rails on this bitmask */
53 int mergeUpto; /* Draw the mergeOut rail up to this level */
54 u32 mergeDown; /* Draw merge lines up from bottom of graph */
55
56 u32 railInUse; /* Mask of occupied rails at this row */
57 };
58
@@ -343,13 +343,11 @@
343 pRow->iRail = findFreeRail(p, pRow->idxTop, pRow->idx, 0, 0);
344 }else{
345 pRow->iRail = ++p->mxRail;
346 }
347 mask = 1<<(pRow->iRail);
348 if( !omitDescenders ){
 
 
349 pRow->bDescender = pRow->nParent>0;
350 for(pLoop=pRow; pLoop; pLoop=pLoop->pNext){
351 pLoop->railInUse |= mask;
352 }
353 }
354

Keyboard Shortcuts

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