Skip to content
Snippets Groups Projects
Commit 72a9a1a0 authored by Joni Krebs's avatar Joni Krebs
Browse files

Merge branch 'master' into joniDev

parents c08e8a44 862b4c1d
No related branches found
No related tags found
1 merge request!39ie algorithm updates
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