Commit d9a2088c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

don't fetch all the data when listing maps

parent 9a86f6b9
minerva (16.0.0~beta.2) stable; urgency=medium
* Bug fix: speed of opening map is improved (#1558)
-- Piotr Gawron <piotr.gawron@uni.lu> Thu, 9 Sep 2021 11:00:00 +0200
minerva (16.0.0~beta.2) stable; urgency=medium
* Small improvement: backgrounds are separated from general overlays (#1532)
* Small improvement: layout of pin popup window is slitghly improved (#1493)
......
......@@ -370,6 +370,10 @@ public class Project implements Serializable {
return topModel.getModel();
}
public ModelData getTopModelData() {
return topModel;
}
public void setTopModel(ModelData topModel) {
this.topModel = topModel;
addModel(topModel);
......
......@@ -114,8 +114,8 @@ public class ModelRestImpl extends BaseRestImpl {
List<Map<String, Object>> result = new ArrayList<>();
Collection<ModelData> originalModels = getModelService().getModelsByProjectId(project.getProjectId());
List<ModelData> models = new ArrayList<>();
if (project.getTopModel() != null) {
ModelData topModel = project.getTopModel().getModelData();
if (project.getTopModelData() != null) {
ModelData topModel = project.getTopModelData();
for (ModelData model : originalModels) {
if (!Objects.equals(model.getId(), topModel.getId())) {
models.add(model);
......
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