Gitlab is now using https://gitlab.lcsb.uni.lu as it's primary address. Please update your bookmarks. FAQ.

Commit 9ce0700f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

top map is visualized properly

parent ab68288b
Pipeline #43276 failed with stage
in 19 minutes and 47 seconds
......@@ -22,7 +22,8 @@ minerva (16.0.0~beta.1) stable; urgency=medium
* Bug fix: export model as model could cause an issue (#1500, #1502)
* Bug fix: problem with export as image with data overlays (#1503, #1498,
#1496)
* Bug fix: chrom autofill is disabled for "Search: " in admin panel tables
* Bug fix: chrome autofill is disabled for "Search: " in admin panel tables
* Bug fix: top map was not selected properly sometimes (#1487)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 9 Jun 2021 15:00:00 +0200
......
......@@ -113,9 +113,15 @@ public class ModelRestImpl extends BaseRestImpl {
private List<Map<String, Object>> createData(Project project) throws QueryException {
List<Map<String, Object>> result = new ArrayList<>();
Collection<ModelData> originalModels = getModelService().getModelsByProjectId(project.getProjectId());
List<ModelData> models = new ArrayList<>(originalModels);
ModelData topModel = project.getTopModel().getModelData();
List<ModelData> models = new ArrayList<>();
for (ModelData model: originalModels) {
if (!Objects.equals(model.getId(), topModel.getId())) {
models.add(model);
}
}
models.sort(ModelData.ID_COMPARATOR);
result.add(getModel(topModel));
for (ModelData model2 : models) {
result.add(getModel(model2));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment