Skip to content
Snippets Groups Projects
Commit 4682e4b0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '833-reupload-overlay-issue' into 'devel_13.1.x'

Resolve "reuploading of an overlay and incorrect error thrown"

See merge request !800
parents d5908332 1fcaaaef
No related branches found
No related tags found
2 merge requests!805Merge 13.1.0 beta.1,!800Resolve "reuploading of an overlay and incorrect error thrown"
Pipeline #10544 failed
......@@ -9,6 +9,10 @@ minerva (12.3.1~beta.1) unstable; urgency=low
* Bug fix: invisible layer shouldn't be shown in the on th map (#813)
* Bug fix: list of availbale annotators is sorted alphabetically (#815)
* Bug fix: redirect url from export panel is fixed (#819)
* Bug fix: allow to reupload the same file without closing add overlay dialog
(#833)
* Bug fix: gene_name column is allowed only in the genetic variant data
overlay
* Bug fix: protein types are sorted properly in "Select valid annotations"
dialog (#815)
* Bug fix: if there is a description of (sub)map then it is available in
......
......@@ -94,7 +94,9 @@ AddOverlayDialog.prototype.createGui = function () {
name: "overlay-file"
});
fileInput.addEventListener("change", function () {
return self.processFile(fileInput.files[0]).then(null, GuiConnector.alert);
return self.processFile(fileInput.files[0]).then(function () {
$(fileInput).val("");
}).catch(GuiConnector.alert);
}, false);
content.appendChild(fileInput);
content.appendChild(guiUtils.createNewLine());
......
......@@ -162,6 +162,9 @@ public class ColorSchemaReader {
Integer nameColumn = schemaColumns.get(ColorSchemaColumn.NAME);
if (nameColumn == null) {
nameColumn = schemaColumns.get(ColorSchemaColumn.GENE_NAME);
} else if (schemaColumns.get(ColorSchemaColumn.GENE_NAME) != null) {
throw new InvalidColorSchemaException(ColorSchemaColumn.GENE_NAME + " and " + ColorSchemaColumn.NAME
+ " column cannot appear in the same dataset");
}
Integer modelNameColumn = schemaColumns.get(ColorSchemaColumn.MODEL_NAME);
Integer identifierColumn = schemaColumns.get(ColorSchemaColumn.IDENTIFIER);
......@@ -292,7 +295,7 @@ public class ColorSchemaReader {
gv.setContig(values[contigColumn]);
schema.addGeneVariation(gv);
if (schema.getName()!=null && schema.getName().contains(";")) {
if (schema.getName() != null && schema.getName().contains(";")) {
String[] names = schema.getName().split(";");
for (String string : names) {
if (!string.trim().isEmpty()) {
......
......@@ -21,7 +21,7 @@ public enum ColorSchemaColumn {
*/
NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }),
GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENERIC, ColorSchemaType.GENETIC_VARIANT }),
GENE_NAME(new ColorSchemaType[] { ColorSchemaType.GENETIC_VARIANT }),
/**
* Name of the element.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment