Unlocks the image. In case the image had been locked several times by the current thread, it gets unlocked only after as many unlock operations as there were previous lock operations.
()
| 292 | * previous lock operations. |
| 293 | */ |
| 294 | public synchronized void unlock() { |
| 295 | if (Thread.currentThread()==lockingThread && lockedCount>1) |
| 296 | lockedCount--; |
| 297 | else { |
| 298 | locked = false; |
| 299 | lockedCount = 0; |
| 300 | lockingThread = null; |
| 301 | if (win instanceof StackWindow) |
| 302 | ((StackWindow)win).setSlidersEnabled(true); |
| 303 | if (IJ.debugMode) IJ.log(title + ": unlocked"); |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | /** Returns 'true' if the image is locked. */ |
| 308 | public boolean isLocked() { |