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

Commit

Permalink
rhbz#728858, Editor navigation should only save if something has chan…
Browse files Browse the repository at this point in the history
…ged, click 'Save as Fuzzy' immediately save
  • Loading branch information
jamesni committed Aug 11, 2011
1 parent 0dc0db1 commit 86aa7d9
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public class InlineTargetCellEditor implements CellEditor<TransUnit>
public void onClick(ClickEvent event)
{
cellValue.setStatus(ContentState.NeedReview);
// acceptEdit();
cellValue.setTarget(textArea.getText());
curCallback.onComplete(curCellEditInfo, cellValue);
}
};

Expand Down Expand Up @@ -380,9 +381,13 @@ public void editCell(CellEditInfo cellEditInfo, TransUnit cellValue, Callback<Tr
// save the content in previous cell before start new editing
if (this.cellValue != null && curRow != cellEditInfo.getRowIndex())
{
// this.cellValue.setStatus(ContentState.Approved);
Log.debug("save content of previous cell");
acceptEdit();
// if something has changed, save as approved
if (!this.cellValue.getTarget().equals(textArea.getText()))
{
Log.debug("save content of previous cell");
this.cellValue.setStatus(ContentState.Approved);
acceptEdit();
}
}

Log.debug("starting edit of cell");
Expand Down

0 comments on commit 86aa7d9

Please sign in to comment.