Skip to content

Commit 6643d71

Browse files
committed
Only use visible tracks when determining the default tracks for a JBrowse session
1 parent 99ac076 commit 6643d71

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jbrowse/src/org/labkey/jbrowse/model/JBrowseSession.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,19 @@ public JSONObject getConfigJson(User u, Logger log) throws PipelineJobException
244244

245245
JSONArray tracks = new JSONArray();
246246
List<JsonFile> jsonFiles = getJsonFiles(u, false);
247+
List<JsonFile> visibleTracks = new ArrayList<>();
247248
for (JsonFile jsonFile : jsonFiles)
248249
{
249250
JSONObject o = jsonFile.toTrackJson(u, rg, log);
250251
if (o != null)
251252
{
252253
tracks.put(o);
254+
visibleTracks.add(jsonFile);
253255
}
254256
}
255257

256258
ret.put("tracks", tracks);
257-
ret.put("defaultSession", getDefaultSessionJson(jsonFiles));
259+
ret.put("defaultSession", getDefaultSessionJson(visibleTracks));
258260

259261
return ret;
260262
}

0 commit comments

Comments
 (0)