Fixed #1964 Freezing on releasing mouse while shape transforming (deadlock)

This commit is contained in:
Jindra Petřík
2023-02-04 17:07:56 +01:00
parent 15ab519570
commit d2c15e4b60
2 changed files with 6 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
### Fixed
- [#1960] Hide tag tree root handles as it was in previous versions
- [#1964] Freezing on releasing mouse while shape transforming (deadlock)
### Changed
- [#1960] Quick search does not search in SWF name or folder names
@@ -2937,6 +2938,7 @@ All notable changes to this project will be documented in this file.
[alpha 8]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha7...alpha8
[alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7
[#1960]: https://www.free-decompiler.com/flash/issues/1960
[#1964]: https://www.free-decompiler.com/flash/issues/1964
[#1029]: https://www.free-decompiler.com/flash/issues/1029
[#1948]: https://www.free-decompiler.com/flash/issues/1948
[#1941]: https://www.free-decompiler.com/flash/issues/1941

View File

@@ -99,7 +99,6 @@ import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.awt.image.VolatileImage;
import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.text.ParseException;
@@ -1219,7 +1218,7 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
registrationPoint = new Point2D.Double(registrationPointUpdated.getX(), registrationPointUpdated.getY());
transform = new Matrix(transformUpdated);
transformUpdated = null;
calcRect();
Rectangle2D transBoundsAfter = getTransformBounds();
Point2D transRegPointAfter = registrationPoint;
@@ -1237,10 +1236,10 @@ public final class ImagePanel extends JPanel implements MediaDisplay {
|| mode == Cursor.W_RESIZE_CURSOR;
if (!isResize && mode != Cursor.DEFAULT_CURSOR && !transRegPointPercentBefore.equals(transRegPointPercentAfter)) {
registrationPointPosition = null;
}
fireBoundsChange(getTransformBounds(), registrationPoint, registrationPointPosition);
}
}
calcRect(); //do not put this inside synchronized block, it cause deadlock
fireBoundsChange(getTransformBounds(), registrationPoint, registrationPointPosition);
repaint();
}
mode = Cursor.DEFAULT_CURSOR;