Fixed nullpointerexception in FileTree that resulted in bug when using
the collapse/expand hierachy in the project overview.
This commit is contained in:
parent
8b24d5dd7c
commit
d518ac2f46
2 changed files with 5 additions and 1 deletions
|
|
@ -201,6 +201,9 @@ public class FileTree extends PanelObservable implements MouseListener {
|
|||
}
|
||||
fileLocation = dir.getAbsolutePath() + fileLocation;
|
||||
|
||||
// Lukas added :
|
||||
if(tree.getSelectionPaths() != null) {
|
||||
|
||||
fileLocations = new String[tree.getSelectionPaths().length];
|
||||
int i = 0;
|
||||
for (TreePath path : tree.getSelectionPaths()) {
|
||||
|
|
@ -225,6 +228,7 @@ public class FileTree extends PanelObservable implements MouseListener {
|
|||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
tree.addMouseListener(this);
|
||||
tree.addMouseListener(gui);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ import javax.swing.plaf.basic.BasicHTML;
|
|||
import javax.swing.plaf.basic.BasicTabbedPaneUI;
|
||||
import javax.swing.text.View;
|
||||
|
||||
import com.sun.java.swing.plaf.windows.WindowsIconFactory;
|
||||
//import com.sun.java.swing.plaf.windows.WindowsIconFactory;
|
||||
|
||||
import edu.utah.ece.async.ibiosim.gui.Gui;
|
||||
import edu.utah.ece.async.ibiosim.gui.ResourceManager;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue