Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ade0baa2 authored by zhuw's avatar zhuw Committed by Rajshekar Eashwarappa
Browse files

Fix init rotate value not 0 when back to original.

reset rotate value when back to original

Change-Id: I2285b2be73445ca816775adf3140acb0bfd3fefd
CRs-Fixed: 2102293
parent 8b0d7ba4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2417,6 +2417,12 @@ DialogInterface.OnDismissListener, PopupMenu.OnDismissListener{
        mMasterImage.setFusionUnderlay(null);
        mMasterImage.resetTranslation();
        mMasterImage.setScaleFactor(1);
        ArrayList<FilterRepresentation> frList = FiltersManager.getManager().getTools();
        for (FilterRepresentation fr : frList) {
            if (fr instanceof FilterRotateRepresentation) {
                ((FilterRotateRepresentation) fr).resetRotation();
            }
        }
        showDefaultImageView();
        showSaveButtonIfNeed();
        invalidateViews();
+4 −0
Original line number Diff line number Diff line
@@ -114,6 +114,10 @@ public class FilterRotateRepresentation extends FilterRepresentation {
        mRotation = rotation;
    }

    public void resetRotation() {
        mRotation = Rotation.ZERO;
    }

    @Override
    public boolean allowsSingleInstanceOnly() {
        return true;