76f8b3c5d8a33e5031cb1762096a5f42f75fd6e6 braney Wed Feb 24 12:24:32 2016 -0800 address #16850 diff --git src/hg/lib/cart.c src/hg/lib/cart.c index d5856c1..dde5943 100644 --- src/hg/lib/cart.c +++ src/hg/lib/cart.c @@ -760,34 +760,36 @@ setUdcTimeout(cart); if (cartVarExists(cart, hgHubDoDisconnect)) doDisconnectHub(cart); pushWarnHandler(cartHubWarn); char *newDatabase = hubConnectLoadHubs(cart); popWarnHandler(); #ifndef GBROWSE if (didSessionLoad) cartCopyCustomTracks(cart); #endif /* GBROWSE */ if (newDatabase != NULL) { - // this is some magic to use the defaultPosition */ - char *oldDb = cartOptionalString(cart, "db"); - if (oldDb != NULL) - hashAdd(oldVars, "db", oldDb); + // this is some magic to use the defaultPosition and reset cart variables + struct hashEl *hel; + if ((hel = hashLookup(oldVars,"db")) != NULL) + hel->val = "none"; + else + hashAdd(oldVars, "db", "none"); cartSetString(cart,"db", newDatabase); } if (exclude != NULL) { while ((ex = *exclude++)) cartExclude(cart, ex); } cartDefaultDisconnector(&conn); if (didSessionLoad) cartHideDefaultTracks(cart); return cart; }