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

Commit 3cd6fc8e authored by nicolasroard's avatar nicolasroard
Browse files

Fix copies / undo manager issues in filters

Change-Id: Icc7671ccfe52a2519ad8f4833e746768ec97cff8
parent f904939a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -596,6 +596,7 @@ public class FilterShowActivity extends FragmentActivity implements OnItemClickL
        ImagePreset copy = new ImagePreset(oldPreset);
        FilterRepresentation representation = copy.getRepresentation(filterRepresentation);
        if (representation == null) {
            filterRepresentation = filterRepresentation.copy();
            copy.addFilter(filterRepresentation);
        } else if (filterRepresentation.getFilterType() == FilterRepresentation.TYPE_GEOMETRY) {
            representation.useParametersFrom(filterRepresentation);
+5 −0
Original line number Diff line number Diff line
@@ -50,6 +50,11 @@ public class FilterVignetteRepresentation extends FilterBasicRepresentation impl
        mRadiusY = ((FilterVignetteRepresentation) a).mRadiusY;
    }

    @Override
    public String toString() {
        return getName() + " : " + mCenterX + ", " + mCenterY + " radius: " + mRadiusX;
    }

    @Override
    public FilterRepresentation copy() {
        FilterVignetteRepresentation representation = new FilterVignetteRepresentation();
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ public class HistoryItem {
    private Bitmap mPreviewImage;

    public HistoryItem(ImagePreset preset, FilterRepresentation representation) {
        mImagePreset = new ImagePreset(preset);
        mImagePreset = preset; // just keep a pointer to the current preset
        if (representation != null) {
            mFilterRepresentation = representation.copy();
        }