Author: rozagh
Date: 2012-08-13 16:24:53 -0700 (Mon, 13 Aug 2012)
New Revision: 30183

Modified:
   
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/TableEventHelperFacade.java
Log:
The payload event for tables are not converted to facad payload for facad 
events. Hence, a RowSetEvent fired from facad table had a payload row from the 
original table. Fixed the problem with selecting and editing nodes/edges from 
table browser.

Modified: 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/TableEventHelperFacade.java
===================================================================
--- 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/TableEventHelperFacade.java
     2012-08-13 23:23:23 UTC (rev 30182)
+++ 
core3/impl/trunk/model-impl/impl/src/main/java/org/cytoscape/model/internal/TableEventHelperFacade.java
     2012-08-13 23:24:53 UTC (rev 30183)
@@ -3,7 +3,9 @@
 import org.cytoscape.event.CyEventHelper;
 import org.cytoscape.event.CyEvent;
 import org.cytoscape.event.CyPayloadEvent;
+import org.cytoscape.model.CyNetwork;
 import org.cytoscape.model.CyTable;
+import org.cytoscape.model.events.RowSetRecord;
 import org.cytoscape.model.events.TableTitleChangedEvent;
 import org.cytoscape.model.events.TablePrivacyChangedEvent;
 import org.cytoscape.model.events.ColumnNameChangedEvent;
@@ -77,7 +79,16 @@
                        LocalTableFacade facade = 
facadeMap.get((CyTable)source);
                        if ( facade == null )
                                return;
-                       
actualHelper.addEventPayload((S)facade,payload,eventType);
+                       if (payload instanceof RowSetRecord){
+                               @SuppressWarnings("unchecked")
+                               P newRSC = (P) new 
RowSetRecord(facade.getRow(((RowSetRecord) 
payload).getRow().get(CyNetwork.SUID, Long.class)), 
+                                               ((RowSetRecord) 
payload).getColumn(), 
+                                               ((RowSetRecord) 
payload).getValue(), 
+                                               ((RowSetRecord) 
payload).getRawValue()
+                                               );
+                               
actualHelper.addEventPayload((S)facade,newRSC,eventType);
+                       }else
+                               
actualHelper.addEventPayload((S)facade,payload,eventType);
                }
        }
 

-- 
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