else
{
int newAnnotationIdWidth = drawLabels(g, clip, width, false, forGUI, null, false);
- width = Math.max(newAnnotationIdWidth, givenWidth);
+ width = newAnnotationIdWidth<givenWidth ? givenWidth: Math.min(newAnnotationIdWidth, givenWidth);
}
drawLabels(g, clip, width, true, forGUI, null, false);
}
}
}
- if (!resizePanel && dragEvent != null && aa != null)
+ if (!resizePanel && dragEvent != null && aa != null && selectedRow>-1 && selectedRow<aa.length)
{
if (actuallyDraw && g != null)
{