Fossil SCM

Improvements to rail selection in the graph layout.

drh 2019-05-16 21:42 graph-improvements
Commit aa43709aa9f8cb78c7902e4e69c645df15eab22167d3d5ef84f33dd10b26fd00
1 file changed +2 -1
+2 -1
--- src/graph.c
+++ src/graph.c
@@ -606,11 +606,12 @@
606606
continue;
607607
}
608608
if( pParent->idx>pRow->idx ){
609609
/* Common case: Child occurs after parent and is above the
610610
** parent in the timeline */
611
- pRow->iRail = findFreeRail(p, 0, pParent->idx, pParent->iRail);
611
+ pRow->iRail = findFreeRail(p, pRow->idxTop, pParent->idx,
612
+ pParent->iRail);
612613
if( p->mxRail>=GR_MAX_RAIL ) return;
613614
pParent->aiRiser[pRow->iRail] = pRow->idx;
614615
}else{
615616
/* Timewarp case: Child occurs earlier in time than parent and
616617
** appears below the parent in the timeline. */
617618
--- src/graph.c
+++ src/graph.c
@@ -606,11 +606,12 @@
606 continue;
607 }
608 if( pParent->idx>pRow->idx ){
609 /* Common case: Child occurs after parent and is above the
610 ** parent in the timeline */
611 pRow->iRail = findFreeRail(p, 0, pParent->idx, pParent->iRail);
 
612 if( p->mxRail>=GR_MAX_RAIL ) return;
613 pParent->aiRiser[pRow->iRail] = pRow->idx;
614 }else{
615 /* Timewarp case: Child occurs earlier in time than parent and
616 ** appears below the parent in the timeline. */
617
--- src/graph.c
+++ src/graph.c
@@ -606,11 +606,12 @@
606 continue;
607 }
608 if( pParent->idx>pRow->idx ){
609 /* Common case: Child occurs after parent and is above the
610 ** parent in the timeline */
611 pRow->iRail = findFreeRail(p, pRow->idxTop, pParent->idx,
612 pParent->iRail);
613 if( p->mxRail>=GR_MAX_RAIL ) return;
614 pParent->aiRiser[pRow->iRail] = pRow->idx;
615 }else{
616 /* Timewarp case: Child occurs earlier in time than parent and
617 ** appears below the parent in the timeline. */
618

Keyboard Shortcuts

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