mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-27 23:07:41 +01:00
Deleting a TMX Map also removes it from created/altered worldmaps, and
marks these as modified.
This commit is contained in:
@@ -496,6 +496,9 @@ public class WorldMapView extends JComponent implements Scrollable {
|
||||
public void pushToModel() {
|
||||
worldmap.segmentX = offsetX / TILE_SIZE;
|
||||
worldmap.segmentY = offsetY / TILE_SIZE;
|
||||
for (String id : worldmap.mapLocations.keySet()) {
|
||||
worldmap.getProject().getMap(id).removeBacklink(worldmap);
|
||||
}
|
||||
worldmap.mapLocations.clear();
|
||||
for (String s : mapLocations.keySet()) {
|
||||
int x = mapLocations.get(s).x / TILE_SIZE;
|
||||
@@ -504,6 +507,10 @@ public class WorldMapView extends JComponent implements Scrollable {
|
||||
worldmap.mapLocations.put(s, new Point(x, y));
|
||||
}
|
||||
|
||||
for (String id : worldmap.mapLocations.keySet()) {
|
||||
worldmap.getProject().getMap(id).addBacklink(worldmap);
|
||||
}
|
||||
|
||||
List<String> toRemove = new ArrayList<String>();
|
||||
for (String s : worldmap.labels.keySet()) {
|
||||
if (!mapLocations.containsKey(s)) {
|
||||
|
||||
Reference in New Issue
Block a user