Fossil SCM

When drawing graphs with step-children, do not allow a leaf node to have step-children.

drh 2020-04-30 12:51 trunk
Commit 90cb54781480b8a338e1d3f613da314d3209b396b229217935355d2c3899284b
1 file changed +3 -1
+3 -1
--- src/graph.c
+++ src/graph.c
@@ -534,17 +534,19 @@
534534
pParent->idxTop = pRow->idxTop;
535535
}
536536
}
537537
538538
if( tmFlags & TIMELINE_FILLGAPS ){
539
- /* If a node has no pChild and there is a node higher up in the graph
539
+ /* If a node has no pChild in the graph
540
+ ** and there is a node higher up in the graph
540541
** that is in the same branch and has no in-graph parent, then
541542
** make the lower node a step-child of the upper node. This will
542543
** be represented on the graph by a thick dotted line without an arrowhead.
543544
*/
544545
for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
545546
if( pRow->pChild ) continue;
547
+ if( pRow->isLeaf ) continue;
546548
for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){
547549
if( pLoop->nParent>0
548550
&& pLoop->zBranch==pRow->zBranch
549551
&& hashFind(p,pLoop->aParent[0])==0
550552
){
551553
--- src/graph.c
+++ src/graph.c
@@ -534,17 +534,19 @@
534 pParent->idxTop = pRow->idxTop;
535 }
536 }
537
538 if( tmFlags & TIMELINE_FILLGAPS ){
539 /* If a node has no pChild and there is a node higher up in the graph
 
540 ** that is in the same branch and has no in-graph parent, then
541 ** make the lower node a step-child of the upper node. This will
542 ** be represented on the graph by a thick dotted line without an arrowhead.
543 */
544 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
545 if( pRow->pChild ) continue;
 
546 for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){
547 if( pLoop->nParent>0
548 && pLoop->zBranch==pRow->zBranch
549 && hashFind(p,pLoop->aParent[0])==0
550 ){
551
--- src/graph.c
+++ src/graph.c
@@ -534,17 +534,19 @@
534 pParent->idxTop = pRow->idxTop;
535 }
536 }
537
538 if( tmFlags & TIMELINE_FILLGAPS ){
539 /* If a node has no pChild in the graph
540 ** and there is a node higher up in the graph
541 ** that is in the same branch and has no in-graph parent, then
542 ** make the lower node a step-child of the upper node. This will
543 ** be represented on the graph by a thick dotted line without an arrowhead.
544 */
545 for(pRow=p->pFirst; pRow; pRow=pRow->pNext){
546 if( pRow->pChild ) continue;
547 if( pRow->isLeaf ) continue;
548 for(pLoop=pRow->pPrev; pLoop; pLoop=pLoop->pPrev){
549 if( pLoop->nParent>0
550 && pLoop->zBranch==pRow->zBranch
551 && hashFind(p,pLoop->aParent[0])==0
552 ){
553

Keyboard Shortcuts

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