Skip to content
Snippets Groups Projects
Commit 862b4c1d authored by Markus Krug's avatar Markus Krug
Browse files

fixed bracket drawing

parent b75e8222
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -106,14 +106,14 @@ public class EditorDrawingUtil {
List<Rectangle> textBounds = EditorDrawingUtil.getTextBounds(annotation, textWidget);
Rectangle bounds = null;
boolean isDrawOpenBracket = annotation.getBegin() == offset;
if (isDrawOpenBracket) {
if (isDrawOpenBracket && textBounds.size()>0) {
bounds = textBounds.get(0);
gc.drawLine(bounds.x, bounds.y + bounds.height - 1, bounds.x + BRACKET_WIDTH, bounds.y + bounds.height - 1);
gc.drawLine(bounds.x, bounds.y, bounds.x, bounds.y + bounds.height - 1);
gc.drawLine(bounds.x, bounds.y, bounds.x + BRACKET_WIDTH, bounds.y);
}
boolean isDrawCloseBracket = annotation.getEnd() == offset + length;
if (isDrawCloseBracket) {
if (isDrawCloseBracket && textBounds.size()>0) {
bounds = textBounds.get(textBounds.size() - 1);
gc.drawLine(bounds.x + bounds.width, bounds.y + bounds.height - 1, bounds.x + bounds.width - BRACKET_WIDTH,
bounds.y + bounds.height - 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment