SideBySide2: Fix Reply and Done buttons

The newly created draft box is probably within the viewportMargin, as
it is created below the box the user clicked Reply or Done on.  Make
the DraftBox immediately visible instead of waiting for a redraw event
from CodeMirror.

Change-Id: I6f8dcab858729a6e7dfe6f1d4024a4a9784d36df
This commit is contained in:
Shawn Pearce
2013-11-23 15:23:35 -08:00
parent 4f97cc1c2b
commit c6eb76b9b2

View File

@@ -599,6 +599,7 @@ public class SideBySide2 extends Screen {
return box;
}
addCommentBox(info, box);
box.setVisible(true);
LineHandle handle = cm.getLineHandle(info.line() - 1);
lineActiveBoxMap.put(handle, box);
return box;
@@ -648,8 +649,8 @@ public class SideBySide2 extends Screen {
box.setDiffChunkInfo(myChunk);
}
box.setGutterWrapper(diffTable.sidePanel.addGutter(cm, info.line() - 1,
box instanceof DraftBox ?
SidePanel.GutterType.DRAFT
box instanceof DraftBox
? SidePanel.GutterType.DRAFT
: SidePanel.GutterType.COMMENT));
return box;
}