This commit is contained in:
Denis Molony 2016-08-09 19:09:11 +10:00
parent 9104389d22
commit 87626f2424
3 changed files with 10 additions and 12 deletions

View File

@ -85,8 +85,8 @@ public class FileEntry extends CatalogEntry
{
DefaultMutableTreeNode segmentNode = new DefaultMutableTreeNode (
new PascalCodeObject (parent, pascalSegment, firstBlock));
node.add (segmentNode);
segmentNode.setAllowsChildren (false);
node.add (segmentNode);
}
}
catch (FileFormatException e)
@ -95,6 +95,7 @@ public class FileEntry extends CatalogEntry
file = new AssemblerProgram (name, buffer, 0xD000);
else
file = new AssemblerProgram (name, buffer, 0);
node.setAllowsChildren (false);
}
break;

View File

@ -103,19 +103,10 @@ public class PascalDisk extends AbstractFormattedDisk
DefaultMutableTreeNode node = new DefaultMutableTreeNode (fileEntry);
fileEntry.setNode (node);
if (fileEntry.fileType == 2)// && dataSource instanceof PascalCode)
if (fileEntry.fileType == 2)
{
node.setAllowsChildren (true);
// this does not trigger correctly when opening the arrow
// PascalCode pascalCode = (PascalCode) dataSource;
// for (PascalSegment pascalSegment : pascalCode)
// {
// DefaultMutableTreeNode segmentNode = new DefaultMutableTreeNode (
// new PascalCodeObject (this, pascalSegment, fileEntry.firstBlock));
// node.add (segmentNode);
// segmentNode.setAllowsChildren (false);
// }
fileEntry.getDataSource ();
}
else
node.setAllowsChildren (false);

View File

@ -37,6 +37,12 @@ public class Wizardry4BootDisk extends PascalDisk
relocator.createNewBuffer (dataDisks);
fileEntry.setFile (relocator);
}
// reset the code segment so that it rebuilds itself from the new data
DefaultMutableTreeNode pascalNode = findNode (currentRoot, "SYSTEM.PASCAL");
fileEntry = (FileEntry) pascalNode.getUserObject ();
fileEntry.setFile (null);
fileEntry.getDataSource ();
}
public static boolean isWizardryIV (Disk disk, boolean debug)