Merge "Fix: Creating Editor comment in Unified view."
This commit is contained in:
@@ -427,7 +427,9 @@ public abstract class AbstractPatchContentTable extends NavigationTable<Object>
|
|||||||
spans[col] = table.getFlexCellFormatter().getRowSpan(row, cell);
|
spans[col] = table.getFlexCellFormatter().getRowSpan(row, cell);
|
||||||
if (col == column) {
|
if (col == column) {
|
||||||
final Widget w = table.getWidget(row, cell);
|
final Widget w = table.getWidget(row, cell);
|
||||||
if (w instanceof CommentEditorPanel) {
|
if (w instanceof CommentEditorPanel
|
||||||
|
&& ((CommentEditorPanel) w).getComment().getKey().getParentKey()
|
||||||
|
.equals(newComment.getKey().getParentKey())) {
|
||||||
// Don't insert two editors on the same position, it doesn't make
|
// Don't insert two editors on the same position, it doesn't make
|
||||||
// any sense to the user.
|
// any sense to the user.
|
||||||
//
|
//
|
||||||
@@ -812,10 +814,10 @@ public abstract class AbstractPatchContentTable extends NavigationTable<Object>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void cannedReply(String message) {
|
private void cannedReply(String message) {
|
||||||
CommentEditorPanel p = createEditor(null);
|
final PatchLineComment newComment = newComment();
|
||||||
|
newComment.setMessage(message);
|
||||||
|
CommentEditorPanel p = createEditor(newComment);
|
||||||
if (p == null) {
|
if (p == null) {
|
||||||
final PatchLineComment newComment = newComment();
|
|
||||||
newComment.setMessage(message);
|
|
||||||
|
|
||||||
enableButtons(false);
|
enableButtons(false);
|
||||||
PatchUtil.DETAIL_SVC.saveDraft(newComment,
|
PatchUtil.DETAIL_SVC.saveDraft(newComment,
|
||||||
|
@@ -198,6 +198,10 @@ public class CommentEditorPanel extends CommentPanel implements ClickHandler,
|
|||||||
return comment.getKey().get() == null;
|
return comment.getKey().get() == null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PatchLineComment getComment() {
|
||||||
|
return comment;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDoubleClick(final DoubleClickEvent event) {
|
public void onDoubleClick(final DoubleClickEvent event) {
|
||||||
edit();
|
edit();
|
||||||
|
Reference in New Issue
Block a user