Skip to content

Commit

Permalink
Fix UI
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Apr 27, 2022
1 parent 791ef63 commit 47fc391
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,14 @@ public void setVisible(boolean visible) {
public void paint(final Graphics2D g, final MapView mv, final Bounds box) {
final Lock lock = this.getData().getReadLock();
try {
// This _must_ be set after operations complete (see JOSM #19516 for more information)
AffineTransform backup = g.getTransform();
if (lock.tryLock(100, TimeUnit.MILLISECONDS)) {
try {
this.paintWithLock(g, mv, box);
} finally {
lock.unlock();
g.setTransform(backup);
}
}
} catch (InterruptedException e) {
Expand Down

0 comments on commit 47fc391

Please sign in to comment.