Skip to content
  • Mario Aichinger's avatar
    Add save and reset state functionality to the crop tool · 3da2a238
    Mario Aichinger authored and Nate Graham's avatar Nate Graham committed
    Summary:
    The state is saved after the crop tool emits CropTool::done and gets
    recalled if a new CropTool is created. The state also gets reset by
    hitting the newly added reset button in the QDialogButtonBox of the
    CropTool. The state also gets reset if the saved crop rectangle is
    not within the image which is about to be cropped.
    
    The use case for this is cropping the multiple images to the same
    area. Like removing boarders of a series of pictures taken in a
    photo both.
    
    Test Plan:
    Select the first image. Use the crop tool to crop it to region.
    Click "Crop".
    Select an image with the same or a larger size.
    Select the crop tool.
    The selection area should now be the same as used on the first image.
    Hitting the reset button should reset all parameters to the defaults.
    
    Alternatively: instead of the second (equal or larger) image select a image smaller than the crop area.
    Again use the crop tool.
    The selection should now cover the whole image.
    
    Reviewers: #gwenview, ngraham
    
    Reviewed By: #gwenview, ngraham
    
    Subscribers: ngraham
    
    Tags: #gwenview
    
    Differential Revision: https://phabricator.kde.org/D28480
    3da2a238