diff --git a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java index 53ff87e5f782..6a3553e4443e 100644 --- a/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java +++ b/platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesActions.java @@ -75,9 +75,8 @@ abstract class CodeStyleSchemesActions extends AbstractSchemeActions getModel().containsScheme(schemeName, isProjectScheme)); + SchemeNameGenerator.getUniqueName(getProjectName(), schemeName -> getModel().containsScheme(schemeName, false)); CodeStyleScheme newScheme = getModel().exportProjectScheme(name); getModel().setUsePerProjectSettings(false); getModel().selectScheme(newScheme, null);