Author: oriol
Date: 2012-04-26 07:54:49 -0700 (Thu, 26 Apr 2012)
New Revision: 29014

Modified:
   
core3/impl/trunk/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/ImportAttributeTableReaderTask.java
Log:
Fixing bug 908. If there is no network open, then there is no need to map the 
new global table to a local table because there is no one.

Modified: 
core3/impl/trunk/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/ImportAttributeTableReaderTask.java
===================================================================
--- 
core3/impl/trunk/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/ImportAttributeTableReaderTask.java
     2012-04-26 04:41:40 UTC (rev 29013)
+++ 
core3/impl/trunk/table-import-impl/src/main/java/org/cytoscape/tableimport/internal/ImportAttributeTableReaderTask.java
     2012-04-26 14:54:49 UTC (rev 29014)
@@ -6,6 +6,7 @@
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Set;
 
 
 import org.apache.poi.ss.usermodel.Workbook;
@@ -128,7 +129,9 @@
                                this.reader = new 
DefaultAttributeTableReader(null,amp,this.is); 
                                loadAnnotation(tm);
                        }
-               
insertTasksAfterCurrentTask(CytoscapeServices.mapGlobalToLocalTableTaskFactory.createTaskIterator());
+               //Only do the mapping if there is some network open
+               if (CytoscapeServices.cyNetworkManager.getNetworkSet().size() > 
0)
+                       
insertTasksAfterCurrentTask(CytoscapeServices.mapGlobalToLocalTableTaskFactory.createTaskIterator());
        }
 
 

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to