Fossil

Check-in [da4a3b4f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a case in the graph renderer where a non-leaf node whose immediate child is not on screen did now show the arrow going straight up to the top of the page.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:da4a3b4ffb6447e16f308f6fd9be012f68af3dd1
User & Date: drh 2016-03-18 14:10:03
Context
2016-03-19
03:05
Update the built-in SQLite to include the "PRAGMA integrity_check" fix. check-in: 567ab193 user: drh tags: trunk
2016-03-18
14:35
Draw the upward riser arrow just a short ways, not to the top of screen, for nodes whose next child is off-screen. check-in: 70ba2951 user: drh tags: short-offscreen-risers
14:10
Fix a case in the graph renderer where a non-leaf node whose immediate child is not on screen did now show the arrow going straight up to the top of the page. check-in: da4a3b4f user: drh tags: trunk
13:06
Minor simplification to the graph layout logic. check-in: f7341102 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/graph.c.

324
325
326
327
328
329
330












331
332
333
334
335
336
337
...
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
...
509
510
511
512
513
514
515


516
517
518
519
520
521
522
    if( pRow->mergeOut>p->mxRail ) p->mxRail = pRow->mergeOut;
    while( p->mxRail<GR_MAX_RAIL && pRow->mergeDown>(BIT(p->mxRail+1)-1) ){
      p->mxRail++;
    }
  }
}














/*
** Compute the complete graph
*/
void graph_finish(GraphContext *p, int omitDescenders){
  GraphRow *pRow, *pDesc, *pDup, *pLoop, *pParent;
  int i;
................................................................................
    int parentRid;

    if( pRow->iRail>=0 ){
      if( pRow->pChild==0 && !pRow->timeWarp ){
        if( omitDescenders || pRow->isLeaf ){
          /* no-op */
        }else{
          pRow->aiRiser[pRow->iRail] = 0;
          mask = BIT(pRow->iRail);
          for(pLoop=pRow; pLoop; pLoop=pLoop->pPrev){
            pLoop->railInUse |= mask;
          }
        }
      }
      continue;
    }
    if( pRow->isDup ){
      continue;
    }else{
................................................................................
        }
      }
    }
    mask = BIT(pRow->iRail);
    pRow->railInUse |= mask;
    if( pRow->pChild ){
      assignChildrenToRail(pRow);


    }
    if( pParent ){
      for(pLoop=pParent->pPrev; pLoop && pLoop!=pRow; pLoop=pLoop->pPrev){
        pLoop->railInUse |= mask;
      }
    }
  }







>
>
>
>
>
>
>
>
>
>
>
>







 







|
<
<
<
<







 







>
>







324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
...
475
476
477
478
479
480
481
482




483
484
485
486
487
488
489
...
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
    if( pRow->mergeOut>p->mxRail ) p->mxRail = pRow->mergeOut;
    while( p->mxRail<GR_MAX_RAIL && pRow->mergeDown>(BIT(p->mxRail+1)-1) ){
      p->mxRail++;
    }
  }
}

/*
** Draw a riser from pRow to the top of the graph
*/
static void riser_to_top(GraphRow *pRow){
  u64 mask = BIT(pRow->iRail);
  pRow->aiRiser[pRow->iRail] = 0;
  while( pRow ){
    pRow->railInUse |= mask;
    pRow = pRow->pPrev;
  }
}


/*
** Compute the complete graph
*/
void graph_finish(GraphContext *p, int omitDescenders){
  GraphRow *pRow, *pDesc, *pDup, *pLoop, *pParent;
  int i;
................................................................................
    int parentRid;

    if( pRow->iRail>=0 ){
      if( pRow->pChild==0 && !pRow->timeWarp ){
        if( omitDescenders || pRow->isLeaf ){
          /* no-op */
        }else{
          riser_to_top(pRow);




        }
      }
      continue;
    }
    if( pRow->isDup ){
      continue;
    }else{
................................................................................
        }
      }
    }
    mask = BIT(pRow->iRail);
    pRow->railInUse |= mask;
    if( pRow->pChild ){
      assignChildrenToRail(pRow);
    }else if( !pRow->isLeaf ){
      riser_to_top(pRow);
    }
    if( pParent ){
      for(pLoop=pParent->pPrev; pLoop && pLoop!=pRow; pLoop=pLoop->pPrev){
        pLoop->railInUse |= mask;
      }
    }
  }