Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fix copy source button issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesni committed Aug 1, 2011
1 parent e3cba59 commit c739cf3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,9 +400,9 @@ public void editCell(CellEditInfo cellEditInfo, TransUnit cellValue, Callback<Tr
}
restoreView();
}

// save the content in previous cell before start new editing
if (this.cellValue != null && curRow != cellEditInfo.getRowIndex() && !textArea.getText().equals(this.cellValue.getTarget()))
if (this.cellValue != null && curRow != cellEditInfo.getRowIndex())
{
Log.debug("save content of previous cell");
acceptEdit();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,19 +490,22 @@ public void onCopySource(CopySourceEvent event)
int row = display.getCurrentPage() * display.getPageSize() + rowOffset;
// display.getTableModel().setRowValueOverride(row,
// event.getTransUnit());
if (display.getTargetCellEditor().isEditing())
{
int curRow = display.getTargetCellEditor().getCurrentRow();
if (curRow == row)
{
display.getTargetCellEditor().setText(event.getTransUnit().getSource());
display.getTargetCellEditor().setTextAreaSize();
}
}
else
// if (display.getTargetCellEditor().isEditing())
// {
// int curRow = display.getTargetCellEditor().getCurrentRow();
// if (curRow == row)
// {
// display.getTargetCellEditor().setText(event.getTransUnit().getSource());
// display.getTargetCellEditor().setTextAreaSize();
// }
// }
if (!display.getTargetCellEditor().isEditing())
{
tableModelHandler.gotoRow(row);

}
display.getTargetCellEditor().setText(event.getTransUnit().getSource());
display.getTargetCellEditor().setTextAreaSize();
}

}));
Expand Down

0 comments on commit c739cf3

Please sign in to comment.