c3d8cab7fb381aa72fdccaa4078333d5968be24c
braney
  Wed Jan 24 09:12:05 2024 -0800
limit maxItems to 10,000

diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c
index 5d0d0c3..fbf1b5c 100644
--- src/hg/hgTracks/simpleTracks.c
+++ src/hg/hgTracks/simpleTracks.c
@@ -171,30 +171,31 @@
 int maxRGBShade = EXPR_DATA_SHADES - 1;
 
 Color scafColor[SCAF_COLORS+1];
 /* declare colors for scaffold coloring, +1 for unused scaffold 0 color */
 
 Color chromColor[CHROM_COLORS+1];
 /* Declare colors for chromosome coloring, +1 for unused chrom 0 color */
 
 /* Have the 3 shades of 8 chromosome colors been allocated? */
 boolean chromosomeColorsMade = FALSE;
 boolean doPliColors = FALSE;
 /* have the 10 scaffold colors been allocated */
 static boolean scafColorsMade = FALSE;
 
 int maxItemsInFullTrack = 1000;  /* Maximum number of items displayed in full */
+int maxItemsPossible = 10000;   /* Maximum possible value for maxItems */
 int maxItemsToUseOverflowDefault = 10000; /* # of items to allow overflow mode*/
 
 /* These variables persist from one incarnation of this program to the
  * next - living mostly in the cart. */
 
 // multi-window variables global to hgTracks
 struct window *windows = NULL;  // list of windows in image
 struct window *currentWindow = NULL;
 bool trackLoadingInProgress;  // flag to delay ss layout until all windows are ready.
 int fullInsideX;      // full-image insideX
 int fullInsideWidth;  // full-image insideWidth
 
 struct virtRegion *virtRegionList = NULL;     // list of regions in virtual chrom
 struct virtChromRegionPos *virtChrom = NULL;  // virtual chrom array of positions and regions
 int virtRegionCount = 0;  // number of regions in virtual chromosome
@@ -802,32 +803,32 @@
 void tgFreeNothing(struct track *tg){}
 int tgItemNoStart(struct track *tg, void *item) {return -1;}
 int tgItemNoEnd(struct track *tg, void *item) {return -1;}
 
 int tgFixedItemHeight(struct track *tg, void *item)
 /* Return item height for fixed height track. */
 {
 return tg->lineHeight;
 }
 
 int maximumTrackItems(struct track *tg)
 /* Return the maximum number of items allowed in track. */
 {
 unsigned int maxItems = trackDbFloatSettingOrDefault(tg->tdb, "maxItems", maxItemsInFullTrack);
 
-if (maxItems > maxItemsInFullTrack)
-    maxItems = maxItemsInFullTrack;
+if (maxItems > maxItemsPossible)
+    maxItems = maxItemsPossible;
 
 return maxItems;
 }
 
 int maximumTrackHeight(struct track *tg)
 /* Return the maximum track height allowed in pixels. */
 {
 int maxItems = maximumTrackItems(tg);
 return maxItems * tl.fontHeight;
 }
 
 static int maxItemsToOverflow(struct track *tg)
 /* Return the maximum number of items to allow overflow indication. */
 {
 int answer = maxItemsToUseOverflowDefault;