remove by instance to ensure that renamed profile is not deleted

This commit is contained in:
Vladimir Krivosheev
2016-11-10 16:37:32 +01:00
parent 536ca45deb
commit eb705f4a90
@@ -492,19 +492,12 @@ public abstract class InspectionToolsConfigurable extends BaseConfigurable
@Override
public void apply() {
SingleInspectionProfilePanel selectedPanel = getSelectedPanel();
for (InspectionProfileModifiableModel profile : myDeletedProfiles) {
// getParentProfile here is original scheme
if (profile.getProfileManager() == myApplicationProfileManager) {
myApplicationProfileManager.deleteProfile(profile.getSource());
}
else {
myProjectProfileManager.deleteProfile(profile.getName());
}
profile.getProfileManager().deleteProfile(profile.getSource());
}
myDeletedProfiles.clear();
SingleInspectionProfilePanel selectedPanel = getSelectedPanel();
for (SingleInspectionProfilePanel panel : myPanels) {
panel.apply();
if (setActiveProfileAsDefaultOnApply() && panel == selectedPanel) {