mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
Fixed copy action bug in table that caused wrong columns to get copied
Closes #1628
This commit is contained in:
parent
3e57a90f05
commit
76c4017e4a
2 changed files with 5 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue