mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-10-22 18:22:23 -09:00
Fixed copy action bug in table that caused wrong columns to get copied
Closes #1628
This commit is contained in:
@@ -1013,15 +1013,16 @@ public class GTable extends JTable {
|
||||
return updated;
|
||||
}
|
||||
|
||||
private Object getCellValue(int row, int column) {
|
||||
private Object getCellValue(int row, int viewColumn) {
|
||||
RowObjectTableModel<Object> rowModel = getRowObjectTableModel();
|
||||
if (rowModel == null) {
|
||||
Object value = super.getValueAt(row, column);
|
||||
Object value = super.getValueAt(row, viewColumn);
|
||||
return maybeConvertValue(value);
|
||||
}
|
||||
|
||||
Object rowObject = rowModel.getRowObject(row);
|
||||
String stringValue = TableUtils.getTableCellStringValue(rowModel, rowObject, column);
|
||||
int modelColumn = convertColumnIndexToModel(viewColumn);
|
||||
String stringValue = TableUtils.getTableCellStringValue(rowModel, rowObject, modelColumn);
|
||||
return maybeConvertValue(stringValue);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public class TableUtils {
|
||||
* @param <ROW_OBJECT> The model's row object type
|
||||
* @param model the model
|
||||
* @param rowObject the row object for the row being queried
|
||||
* @param column the column index
|
||||
* @param column the column index <b>in the table model</b>
|
||||
* @return the string value; null if no value can be fabricated
|
||||
*/
|
||||
public static <ROW_OBJECT> String getTableCellStringValue(RowObjectTableModel<ROW_OBJECT> model,
|
||||
|
||||
Reference in New Issue
Block a user