Author: jm
Date: 2012-08-13 14:15:44 -0700 (Mon, 13 Aug 2012)
New Revision: 30177
Modified:
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/BrowserTable.java
Log:
References #1366: Fixed issues 2 and 3 by doing proper view-model space
conversions.
Modified:
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/BrowserTable.java
===================================================================
---
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/BrowserTable.java
2012-08-13 19:27:12 UTC (rev 30176)
+++
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/BrowserTable.java
2012-08-13 21:15:44 UTC (rev 30177)
@@ -232,7 +232,7 @@
// moved SUID column. However, since the rows might be
sorted we
// need to convert the index to model
final ValidatedObjectAndEditString selected =
(ValidatedObjectAndEditString) btModel.getValueAt(
- rowsSelected[i], pKeyName);
+
convertRowIndexToModel(rowsSelected[i]), pKeyName);
targetRows.add(btModel.getRow(selected.getValidatedObject()));
}
@@ -920,7 +920,8 @@
final int rowCount = getRowCount();
for(int i=0; i<rowCount; i++) {
//getting the row from data table solves the problem
with hidden or moved SUID column. However, since the rows might be sorted we
need to convert the index to model
- final ValidatedObjectAndEditString tableKey =
(ValidatedObjectAndEditString) model.getValueAt(i, pKeyName );
+ int modelRow = convertRowIndexToModel(i);
+ final ValidatedObjectAndEditString tableKey =
(ValidatedObjectAndEditString) model.getValueAt(modelRow, pKeyName );
Long pk = null;
try{
// TODO: Temp fix: is it a requirement that all
CyTables have a Long SUID column as PK?
@@ -934,7 +935,6 @@
}else if
(suidMapUnselected.keySet().contains(pk)){
removeRowSelectionInterval(i, i);
}
-
}
}
}
--
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.