diff --git a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java index c22f1f03c5..a9c982050f 100644 --- a/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java +++ b/Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/module/ui/dialog/PCDsDlg.java @@ -311,7 +311,12 @@ public class PCDsDlg extends IDialog implements ItemListener { this.id = inPcdCodedId; if (this.id != null) { - this.jComboBoxCName.setSelectedItem(id.getName()); + for (int index = 0; index < this.jComboBoxCName.getItemCount(); index++) { + if (this.jComboBoxCName.getItemAt(index).toString().equals(id.getName())) { + this.jComboBoxCName.setSelectedIndex(index); + break; + } + } this.jTextFieldTokenSpaceGuid.setText(id.getGuid()); this.jTextFieldDefaultValue.setText(id.getValue()); this.jComboBoxUsage.setSelectedItem(id.getUsage());