diff Applications/StoneWebViewer/WebApplication/app.js @ 2071:1096d92febfc

Open the first loaded series only if it is part of a selected study
author Alain Mazy <am@osimis.io>
date Thu, 29 Jun 2023 11:12:16 +0200
parents b2738d7a388d
children 4087511e8eef
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/app.js	Thu Mar 30 17:34:07 2023 +0200
+++ b/Applications/StoneWebViewer/WebApplication/app.js	Thu Jun 29 11:12:16 2023 +0200
@@ -1400,8 +1400,8 @@
       var seriesInstanceUid = args.detail.seriesInstanceUid;
       that.UpdateIsSeriesComplete(studyInstanceUid, seriesInstanceUid);
 
-      // Automatically open the first series to be loaded (new in Stone Web viewer 2.5)
-      if (that.isFirstSeries) {
+      // Automatically open the first selected series to be loaded (new in Stone Web viewer 2.5)
+      if (that.isFirstSeries && that.selectedStudies.includes(studyInstanceUid)) {
         that.SetViewportSeriesInstanceUid(1, seriesInstanceUid);
         that.isFirstSeries = false;
       }