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 Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/graph.c.

   324    324       if( pRow->mergeOut>p->mxRail ) p->mxRail = pRow->mergeOut;
   325    325       while( p->mxRail<GR_MAX_RAIL && pRow->mergeDown>(BIT(p->mxRail+1)-1) ){
   326    326         p->mxRail++;
   327    327       }
   328    328     }
   329    329   }
   330    330   
          331  +/*
          332  +** Draw a riser from pRow to the top of the graph
          333  +*/
          334  +static void riser_to_top(GraphRow *pRow){
          335  +  u64 mask = BIT(pRow->iRail);
          336  +  pRow->aiRiser[pRow->iRail] = 0;
          337  +  while( pRow ){
          338  +    pRow->railInUse |= mask;
          339  +    pRow = pRow->pPrev;
          340  +  }
          341  +}
          342  +
   331    343   
   332    344   /*
   333    345   ** Compute the complete graph
   334    346   */
   335    347   void graph_finish(GraphContext *p, int omitDescenders){
   336    348     GraphRow *pRow, *pDesc, *pDup, *pLoop, *pParent;
   337    349     int i;
................................................................................
   463    475       int parentRid;
   464    476   
   465    477       if( pRow->iRail>=0 ){
   466    478         if( pRow->pChild==0 && !pRow->timeWarp ){
   467    479           if( omitDescenders || pRow->isLeaf ){
   468    480             /* no-op */
   469    481           }else{
   470         -          pRow->aiRiser[pRow->iRail] = 0;
   471         -          mask = BIT(pRow->iRail);
   472         -          for(pLoop=pRow; pLoop; pLoop=pLoop->pPrev){
   473         -            pLoop->railInUse |= mask;
   474         -          }
          482  +          riser_to_top(pRow);
   475    483           }
   476    484         }
   477    485         continue;
   478    486       }
   479    487       if( pRow->isDup ){
   480    488         continue;
   481    489       }else{
................................................................................
   509    517           }
   510    518         }
   511    519       }
   512    520       mask = BIT(pRow->iRail);
   513    521       pRow->railInUse |= mask;
   514    522       if( pRow->pChild ){
   515    523         assignChildrenToRail(pRow);
          524  +    }else if( !pRow->isLeaf ){
          525  +      riser_to_top(pRow);
   516    526       }
   517    527       if( pParent ){
   518    528         for(pLoop=pParent->pPrev; pLoop && pLoop!=pRow; pLoop=pLoop->pPrev){
   519    529           pLoop->railInUse |= mask;
   520    530         }
   521    531       }
   522    532     }