Hi everyone
I need your help to fix a bug in MZmine. The problem is that after adding a new
peak to the peak list table, it is not shown in the tree if the peak list is
expanded in the main window. When a user then deletes this row, an error is
returned in SimplePeakList.java l. 246.
Based on what I can see, the problem is that the project tree model is not
updated after adding the row in SimplePeakList.java:
public void addRow(PeakListRow row) {
List<RawDataFile> myFiles = Arrays.asList(this.getRawDataFiles());
for (RawDataFile testFile : row.getRawDataFiles()) {
if (!myFiles.contains(testFile))
throw (new IllegalArgumentException("Data file " +
testFile+ " is not in this peak list"));
}
peakListRows.add(row);
...
}
Deleting a non-user added row works fine and I have therefore tried adding the
following to addRow():
// We have to update the project tree model
MZmineProjectImpl project = (MZmineProjectImpl) MZmineCore.getCurrentProject();
PeakListTreeModel treeModel = project.getPeakListTreeModel();
treeModel.addObject(row);
However, I get the following error when loading a project and also a new row is
not added to the peak list tree:
java.lang.IllegalStateException: This method must be called from Swing thread
Can anyone please help solve this bug?
Best regards,
Thomas
------------------------------------------------------------------------------
_______________________________________________
Mzmine-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mzmine-devel