Fixed IDEA-79468 Code Style: saving Project scheme to global list: if switch to new scheme is rejected, irrelevant scheme is shown in the combobox

This commit is contained in:
Rustam Vishnyakov
2012-03-28 13:24:57 +04:00
parent 9980be2ecf
commit acf653ddc0
@@ -115,7 +115,12 @@ public class CodeStyleSchemesPanel{
schemes.addAll(myModel.getAllSortedSchemes());
DefaultComboBoxModel model = new DefaultComboBoxModel(schemes.toArray());
myCombo.setModel(model);
myCombo.setSelectedItem(myModel.getSelectedGlobalScheme());
if (myModel.isUsePerProjectSettings()) {
myCombo.setSelectedItem(myModel.getProjectScheme());
}
else {
myCombo.setSelectedItem(myModel.getSelectedGlobalScheme());
}
}
finally {
myIsReset = false;