Skip to content

Commit 290f7f7

Browse files
committed
619: Overriding layouts and templates allows to select an incompatible theme
1 parent f0aeba6 commit 290f7f7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/OverrideInThemeDialog.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,13 @@ public static void open(final @NotNull Project project, final PsiFile psiFile) {
131131
}
132132

133133
private void fillThemeOptions() {
134+
final String area = psiFile.getVirtualFile().getPath().split("view/")[1].split("/")[0];
134135
final List<String> themeNames = new ModuleIndex(project).getEditableThemeNames();
135-
for (final String themeName: themeNames) {
136-
theme.addItem(themeName);
136+
final String baseArea = "base";
137+
for (final String themeName : themeNames) {
138+
if (baseArea.equals(area) || themeName.split("/")[0].equals(area)) {
139+
theme.addItem(themeName);
140+
}
137141
}
138142
}
139143
}

0 commit comments

Comments
 (0)