mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix inspections dialog apply button behaviour (IDEA-240687)
GitOrigin-RevId: 2d8cac1d3c2102ab654b55455e3273970a00066c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
65ce086c45
commit
d5ebd0fca2
+1
-1
@@ -1072,7 +1072,7 @@ public class SingleInspectionProfilePanel extends JPanel {
|
||||
public boolean isModified() {
|
||||
if (myTreeTable == null) return false;
|
||||
if (myModified) return true;
|
||||
if (myProfile.isChanged() || myProfile.getSchemeState() == SchemeState.POSSIBLY_CHANGED) return true;
|
||||
if (myProfile.isChanged()) return true;
|
||||
if (myProfile.getSource().isProjectLevel() != myProfile.isProjectLevel()) return true;
|
||||
if (!Comparing.strEqual(myProfile.getSource().getName(), myProfile.getName())) return true;
|
||||
if (!Arrays.equals(myInitialScopesOrder, myProfile.getScopesOrder())) return true;
|
||||
|
||||
+4
@@ -98,6 +98,7 @@ public class StructuralSearchProfileActionProvider extends InspectionProfileActi
|
||||
final SSBasedInspection inspection = InspectionProfileUtil.getStructuralSearchInspection(profile);
|
||||
inspection.removeConfigurationsWithUuid(UUID.fromString(shortName));
|
||||
profile.removeTool(shortName);
|
||||
profile.setModified(true);
|
||||
InspectionProfileUtil.fireProfileChanged(profile);
|
||||
}
|
||||
}
|
||||
@@ -152,6 +153,9 @@ public class StructuralSearchProfileActionProvider extends InspectionProfileActi
|
||||
configuration.setUuid(null);
|
||||
inspection.addConfiguration(configuration);
|
||||
addInspectionToProfile(project, profile, configuration);
|
||||
if (profile instanceof InspectionProfileModifiableModel) {
|
||||
((InspectionProfileModifiableModel)profile).setModified(true);
|
||||
}
|
||||
InspectionProfileUtil.fireProfileChanged(profile);
|
||||
profile.getProfileManager().fireProfileChanged(profile);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user