Permalink
Browse files

Fix for outline when opening with structureDB

  • Loading branch information...
1 parent 20edd2e commit 3ba26d93690f12548cade517bce7b90343ab8819 Arvid Berg committed with Mar 26, 2010
View
7 ...bioclipse.cdk.ui.sdfeditor/src/net/bioclipse/cdk/ui/sdfeditor/editor/MolTableOutline.java
@@ -105,11 +105,14 @@ public boolean hasChildren( Object element ) {
}
});
tree.setInput( model );
+ tree.expandAll();
}
public void setInput(IMoleculesEditorModel model) {
this.model = model;
- getTreeViewer().setInput( model );
- getTreeViewer().expandAll();
+ if ( getTreeViewer() != null ) {
+ getTreeViewer().setInput( model );
+ getTreeViewer().expandAll();
+ }
}
}
View
3 ...bioclipse.cdk.ui.sdfeditor/src/net/bioclipse/cdk/ui/sdfeditor/editor/MoleculesEditor.java
@@ -564,6 +564,9 @@ public Object getAdapter( Class adapter ) {
if ( IContentOutlinePage.class.equals( adapter ) ) {
if ( outlinePage == null ) {
outlinePage = new MolTableOutline();
+ Object model = getMolTableViewer().getInput();
+ if(model instanceof IMoleculesEditorModel)
+ outlinePage.setInput( (IMoleculesEditorModel) model );
}
return outlinePage;
}

0 comments on commit 3ba26d9

Please sign in to comment.