Update editor scripts to Gridarta r5480.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@10072 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
548577faef
commit
97ecd9cad0
|
|
@ -278,6 +278,7 @@ void convertMap(File mapFile, String mapPath) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
mapControl.getMapModel().beginTransaction("spell conversion");
|
mapControl.getMapModel().beginTransaction("spell conversion");
|
||||||
try {
|
try {
|
||||||
Iterator it1 = mapControl.getAllSquares().iterator();
|
Iterator it1 = mapControl.getAllSquares().iterator();
|
||||||
|
|
@ -297,6 +298,9 @@ void convertMap(File mapFile, String mapPath) {
|
||||||
countMapFiles++;
|
countMapFiles++;
|
||||||
mapControl.save();
|
mapControl.save();
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
mapManager.release(mapControl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (baseDirectory == null || baseDirectory.length() <= 0) {
|
if (baseDirectory == null || baseDirectory.length() <= 0) {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ void normalizeMap(File mapFile, String mapPath) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (!mapPath.startsWith("/styles")
|
if (!mapPath.startsWith("/styles")
|
||||||
&& !mapPath.startsWith("/editor")) {
|
&& !mapPath.startsWith("/editor")) {
|
||||||
mapModel = map.getMapModel();
|
mapModel = map.getMapModel();
|
||||||
|
|
@ -31,6 +32,9 @@ void normalizeMap(File mapFile, String mapPath) {
|
||||||
}
|
}
|
||||||
|
|
||||||
map.save();
|
map.save();
|
||||||
|
} finally {
|
||||||
|
mapManager.release(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (baseDirectory == null || baseDirectory.length() <= 0) {
|
if (baseDirectory == null || baseDirectory.length() <= 0) {
|
||||||
|
|
|
||||||
|
|
@ -25,14 +25,16 @@ void checkMap(File mapFile, String mapPath) {
|
||||||
log("- cannot load map file");
|
log("- cannot load map file");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorCollector errorCollector;
|
ErrorCollector errorCollector;
|
||||||
|
try {
|
||||||
try {
|
try {
|
||||||
validators.validateAll(map.getMapModel());
|
validators.validateAll(map.getMapModel());
|
||||||
} finally {
|
} finally {
|
||||||
errorCollector = map.getMapModel().getErrors();
|
errorCollector = map.getMapModel().getErrors();
|
||||||
if (map.nViews() <= 0) {
|
|
||||||
mapManager.closeLevel(map);
|
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
mapManager.release(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,7 @@ boolean updateMap(File mapFile, File pictureFile) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
if (map.nViews() <= 0) {
|
mapManager.release(map);
|
||||||
mapManager.closeLevel(map);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue