Fixed ordering problems with inherited tables

git-svn-id: http://svn.3splooges.com/romraider-arch/trunk@316 d2e2e1cd-ba16-0410-be16-b7c4453c7c2d
This commit is contained in:
Jared Gould 2006-10-30 20:15:24 +00:00
parent 42c2aee137
commit 9363146600
1 changed files with 4 additions and 1 deletions

View File

@ -22,13 +22,16 @@ public class Rom implements Serializable {
} }
public void addTable(Table table) { public void addTable(Table table) {
boolean found = false;
for (int i = 0; i < tables.size(); i++) { for (int i = 0; i < tables.size(); i++) {
if (tables.get(i).getName().equalsIgnoreCase(table.getName())) { if (tables.get(i).getName().equalsIgnoreCase(table.getName())) {
tables.remove(i); tables.remove(i);
tables.add(i, table);
found = true;
break; break;
} }
} }
tables.add(table); if (!found) tables.add(table);
} }
public Table getTable(String tableName) throws TableNotFoundException { public Table getTable(String tableName) throws TableNotFoundException {