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;
|
||||
}
|
||||
|
||||
try {
|
||||
mapControl.getMapModel().beginTransaction("spell conversion");
|
||||
try {
|
||||
Iterator it1 = mapControl.getAllSquares().iterator();
|
||||
|
|
@ -297,6 +298,9 @@ void convertMap(File mapFile, String mapPath) {
|
|||
countMapFiles++;
|
||||
mapControl.save();
|
||||
}
|
||||
} finally {
|
||||
mapManager.release(mapControl);
|
||||
}
|
||||
}
|
||||
|
||||
if (baseDirectory == null || baseDirectory.length() <= 0) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ void normalizeMap(File mapFile, String mapPath) {
|
|||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (!mapPath.startsWith("/styles")
|
||||
&& !mapPath.startsWith("/editor")) {
|
||||
mapModel = map.getMapModel();
|
||||
|
|
@ -31,6 +32,9 @@ void normalizeMap(File mapFile, String mapPath) {
|
|||
}
|
||||
|
||||
map.save();
|
||||
} finally {
|
||||
mapManager.release(map);
|
||||
}
|
||||
}
|
||||
|
||||
if (baseDirectory == null || baseDirectory.length() <= 0) {
|
||||
|
|
|
|||
|
|
@ -25,14 +25,16 @@ void checkMap(File mapFile, String mapPath) {
|
|||
log("- cannot load map file");
|
||||
return;
|
||||
}
|
||||
|
||||
ErrorCollector errorCollector;
|
||||
try {
|
||||
try {
|
||||
validators.validateAll(map.getMapModel());
|
||||
} finally {
|
||||
errorCollector = map.getMapModel().getErrors();
|
||||
if (map.nViews() <= 0) {
|
||||
mapManager.closeLevel(map);
|
||||
}
|
||||
} finally {
|
||||
mapManager.release(map);
|
||||
}
|
||||
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
|
|
|||
|
|
@ -47,9 +47,7 @@ boolean updateMap(File mapFile, File pictureFile) {
|
|||
return false;
|
||||
}
|
||||
} finally {
|
||||
if (map.nViews() <= 0) {
|
||||
mapManager.closeLevel(map);
|
||||
}
|
||||
mapManager.release(map);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue