mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fixed IDEA-79459 Code Style Schemes dialog has no preselected scheme on opening, AE at ManageCodeStyleSchemesDialog$3.actionPerformed()
This commit is contained in:
+11
@@ -70,6 +70,8 @@ public class ManageCodeStyleSchemesDialog extends DialogWrapper {
|
||||
updateActions();
|
||||
}
|
||||
});
|
||||
setDefaultSelection();
|
||||
|
||||
|
||||
myDeleteButton.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
@@ -345,5 +347,14 @@ public class ManageCodeStyleSchemesDialog extends DialogWrapper {
|
||||
mySchemesTableModel.copyToProject(getSelectedScheme());
|
||||
}
|
||||
|
||||
private void setDefaultSelection() {
|
||||
CodeStyleScheme selectedScheme = myModel.getSelectedScheme();
|
||||
for (int i = 0; i < mySchemesTableModel.getRowCount(); i ++) {
|
||||
if (mySchemesTableModel.getSchemeAt(i).equals(selectedScheme)) {
|
||||
mySchemesTable.getSelectionModel().setSelectionInterval(i, i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user