From: <ba...@us...> - 2009-04-08 19:16:26
|
Revision: 2446 http://obo.svn.sourceforge.net/obo/?rev=2446&view=rev Author: balhoff Date: 2009-04-08 19:16:25 +0000 (Wed, 08 Apr 2009) Log Message: ----------- Fixed bug in post-composition caused by new autocomplete. Modified Paths: -------------- phenex/trunk/src/org/phenoscape/view/PhenoscapeGUIComponent.java Modified: phenex/trunk/src/org/phenoscape/view/PhenoscapeGUIComponent.java =================================================================== --- phenex/trunk/src/org/phenoscape/view/PhenoscapeGUIComponent.java 2009-04-08 19:07:54 UTC (rev 2445) +++ phenex/trunk/src/org/phenoscape/view/PhenoscapeGUIComponent.java 2009-04-08 19:16:25 UTC (rev 2446) @@ -43,8 +43,8 @@ * Update SelectionManager with current term selection. This allows components * like the Term Info panel to display information about the term. */ - protected void updateGlobalTermSelection(OBOObject term) { - this.getController().getPhenoteSelectionManager().selectTerm(this, (OBOClass)term, false); //TODO this cast may not always be right + protected void updateGlobalTermSelection(OBOClass term) { + this.getController().getPhenoteSelectionManager().selectTerm(this, term, false); } /** @@ -104,8 +104,8 @@ final JList menu = (JList)source; try { final Object value = menu.getSelectedValue(); - if (value instanceof SearchHit) { - updateGlobalTermSelection(((SearchHit<OBOObject>)value).getHit()); + if ((value instanceof SearchHit) && (((SearchHit<OBOObject>)value).getHit() instanceof OBOClass)) { + updateGlobalTermSelection((OBOClass)((SearchHit<OBOObject>)value).getHit()); } else { // sometimes the selection is a String instead } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |