From 361caffe5d6a140ef206c72662c9861e00d87013 Mon Sep 17 00:00:00 2001 From: felmer <felmer> Date: Mon, 31 Aug 2015 09:34:07 +0000 Subject: [PATCH] SSDM-2279: Bug fixed in ResolutionChooserWidget: Take the first resolution of the available resolutions if old resolution doesn't exist. SVN: 34545 --- .../components/imageviewer/ResolutionChooserWidget.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/resources/components/imageviewer/ResolutionChooserWidget.js b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/resources/components/imageviewer/ResolutionChooserWidget.js index c822ed057f8..9ea2db2e914 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/resources/components/imageviewer/ResolutionChooserWidget.js +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/public/resources/components/imageviewer/ResolutionChooserWidget.js @@ -33,7 +33,11 @@ define([ "jquery", "components/imageviewer/AbstractWidget", "components/imagevie setSelectedResolution : function(resolution) { if (resolution != null && $.inArray(resolution, this.getResolutionsCodes()) == -1) { - resolution = null; + if (this.getResolutionsCodes().length > 0) { + resolution = this.getResolutionsCodes()[0]; + } else { + resolution = null; + } } if (this.selectedResolution != resolution) { -- GitLab