()
| 1291 | final Point cursorLoc = getCursorLoc(); |
| 1292 | pressTimer.schedule(new TimerTask() { |
| 1293 | public void run() { |
| 1294 | if (pressTimer != null) { |
| 1295 | pressTimer.cancel(); |
| 1296 | pressTimer = null; |
| 1297 | } |
| 1298 | Roi roi2 = imp.getRoi(); |
| 1299 | int size2 = roi2!=null?roi2.size():0; |
| 1300 | Rectangle r2 = roi2!=null?roi2.getBounds():null; |
| 1301 | boolean empty = r2!=null&&r2.width==0&&r2.height==0; |
| 1302 | int state = roi2!=null?roi2.getState():-1; |
| 1303 | boolean unchanged = state!=Roi.MOVING_HANDLE && r1!=null && r2!=null && r2.x==r1.x |
| 1304 | && r2.y==r1.y && r2.width==r1.width && r2.height==r1.height && size2==size1 |
| 1305 | && !(size2>1&&state==Roi.CONSTRUCTING); |
| 1306 | boolean cursorMoved = !getCursorLoc().equals(cursorLoc); |
| 1307 | if ((roi1==null && (size2<=1||empty)) || unchanged) { |
| 1308 | if (roi1==null) imp.deleteRoi(); |
| 1309 | if (!cursorMoved && Toolbar.getToolId()!=Toolbar.HAND) |
| 1310 | handlePopupMenu(e); |
| 1311 | } |
| 1312 | } |
| 1313 | }, longClickDelay); |
| 1314 | } |
| 1315 |
nothing calls this directly
no test coverage detected