Fix crop tool not saving config when navigating away
ClosedPublic

Authored by huoni on Mar 20 2018, 11:45 PM.

Details

Summary

Tool settings are saved in toolDeactivated, which is only triggered
when the tool is exited gracefully (e.g. when clicking Crop or Cancel).
This patch calls toolDeactivated when the parent RasterImageView
object is destroyed, ensuring settings are saved even when navigating
away, e.g. to another image, or back to Browse.

BUG: 392036

Test Plan

Crop tool > activate/deactivate Advanced > navigate to next
image > open Crop tool > ensure the Advanced state is saved.
Also navigate away by clicking Browse.
Ensure navigating without Crop active is unaffected.

Diff Detail

Repository
R260 Gwenview
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
huoni requested review of this revision.Mar 20 2018, 11:45 PM
huoni created this revision.
huoni edited the summary of this revision. (Show Details)Mar 20 2018, 11:46 PM
huoni edited the test plan for this revision. (Show Details)
rkflx accepted this revision.Mar 21 2018, 1:06 AM

Nice, LGTM.

Before landing, please read https://phabricator.kde.org/D11477#229715 ;)

(I'll review the rest of your changes tomorrow.)

This revision is now accepted and ready to land.Mar 21 2018, 1:06 AM
This revision was automatically updated to reflect the committed changes.
huoni added a comment.Mar 21 2018, 1:32 AM

Nice, LGTM.

Before landing, please read https://phabricator.kde.org/D11477#229715 ;)

(I'll review the rest of your changes tomorrow.)

Thanks, I landed on stable, and merged to master as per wiki instructions.

rkflx added a comment.Mar 21 2018, 9:29 AM

Thanks, you did fine.