Commit 840e56b6 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch '684-overlay-order' into 'devel_12.2.x'

Resolve "For an archived map the default overlay is Empty"

See merge request !675
parents d0b38a0c 11021ca1
Pipeline #9015 passed with stages
in 28 minutes and 56 seconds
minerva (12.2.0~beta.2) unstable; urgency=medium
* Bug fix: order of the overlays is defined explicitly also for general
overlays (#684)
* Bug fix: files are saved in proper folder (#694, #670)
* Bug fix: removing comments in a project asked for confirmation twice after
edit project dialog for specific project was opened; closed and opened
......
......@@ -486,6 +486,22 @@ OverlayPanel.prototype.refresh = function (showDefault) {
var body = document.createElement("tbody");
table.appendChild(body);
generalOverlays.sort(function (o1, o2) {
var val1 = o1.getId();
var val2 = o2.getId();
if (o1.getOrder() !== o2.getOrder()) {
val1 = o1.getOrder();
val2 = o2.getOrder();
}
if (val1 < val2) {
return -1;
}
if (val1 > val2) {
return 1;
}
return 0;
});
for (i = 0; i < generalOverlays.length; i++) {
overlay = generalOverlays[i];
body.appendChild(self.createOverlayRow(overlay, selectedOverlay[overlay.getId()], false));
......
......@@ -648,6 +648,10 @@ public class ProjectService implements IProjectService {
submodelId++;
}
}
int order = 0;
for (Layout l : project.getLayouts()) {
l.setOrderIndex(order++);
}
projectDao.update(project);
if (params.isUpdateAnnotations()) {
......
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