Reformat Dialog: persist reformat only VCS changed lines checkbox state only if checkbox is enabled.

Previously, if you show reformat dialog on file with no changes, checkbox will be disabled and will be selected "Whole File" scope option, and used it later on reformat.
This commit is contained in:
Yaroslav Lepenkin
2015-07-06 14:22:53 +03:00
parent 503038da45
commit 820ce7170a
@@ -151,7 +151,7 @@ public class LayoutCodeDialog extends DialogWrapper {
myLastRunOptions.saveRearrangeState(myFile.getLanguage(), myRunOptions.isRearrangeCode());
}
if (!mySelectedTextRadioButton.isSelected()) {
if (!mySelectedTextRadioButton.isSelected() && myOnlyVCSChangedTextRb.isEnabled()) {
myLastRunOptions.saveProcessVcsChangedTextState(myOnlyVCSChangedTextRb.isSelected());
}
}
@@ -201,8 +201,8 @@ public class LayoutCodeDialog extends DialogWrapper {
@Override
protected void doOKAction() {
super.doOKAction();
saveCurrentConfiguration();
super.doOKAction();
}
public LayoutCodeOptions getRunOptions() {