fix
This commit is contained in:
parent
760c2721aa
commit
1e3c316731
@ -586,7 +586,7 @@ private void ReloadMaps() {
|
||||
int result = fs.showSaveDialog(null);
|
||||
if (result == JFileChooser.APPROVE_OPTION) {
|
||||
File selectedFile = fs.getSelectedFile();
|
||||
if (_mapCollection.SaveData(selectedFile.getPath()))
|
||||
if (_mapCollection.SaveData(selectedFile.getPath()+".txt"))
|
||||
{
|
||||
JOptionPane.showMessageDialog(null, "Сохранение прошло успешно", "Результат",JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
|
@ -217,10 +217,11 @@ public class MapsCollection {
|
||||
map = new HorizontalMap();
|
||||
break;
|
||||
}
|
||||
_mapStorages.put(elem[0], new MapWithSetMachineGeneric<IDrawingObject, AbstractMap>(_pictureWidth, _pictureHeight, map));
|
||||
if(_mapStorages.containsKey(elem[0])){
|
||||
_mapStorages.get(elem[0]).Clear();
|
||||
}
|
||||
else _mapStorages.put(elem[0], new MapWithSetMachineGeneric<IDrawingObject, AbstractMap>(_pictureWidth, _pictureHeight, map));
|
||||
|
||||
while((str = br.readLine()) != null) {
|
||||
_mapStorages.get(elem[0]).LoadData(str.split(separatorData + "\n?"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user