()
| 309 | } |
| 310 | |
| 311 | private boolean closeFile() |
| 312 | { |
| 313 | if (Main.saveDatabase == null) { |
| 314 | return true; |
| 315 | } |
| 316 | |
| 317 | if (Main.dataModified) { |
| 318 | int option = JOptionPane.showConfirmDialog(this, "The current save has been modified. Do you want to save the changes?", "Save Modified", 1); |
| 319 | |
| 320 | if (option == 2) { |
| 321 | return false; |
| 322 | } |
| 323 | if ((option == 0) && |
| 324 | (!saveFile())) { |
| 325 | return false; |
| 326 | } |
| 327 | |
| 328 | } |
| 329 | |
| 330 | Main.database = null; |
| 331 | Main.modDatabase = null; |
| 332 | Main.saveDatabase = null; |
| 333 | Main.dataModified = false; |
| 334 | this.tabbedPane.setVisible(false); |
| 335 | return true; |
| 336 | } |
| 337 | |
| 338 | private void unpackSave() |
| 339 | { |
no test coverage detected