Skip to content

Commit

Permalink
Hid opcodecode selector if there is only one option
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Aug 13, 2017
1 parent a1d6c2a commit dc2978e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/me/coley/recaf/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ public static void main(String[] args) {
Program program = new Program();
program.showGui();
// Quick testing
/*
try {
Thread.sleep(200);
program.openFile(new java.io.File("test.jar"));
program.selectClass(program.jarData.classes.get("me/coley/Program"));
} catch (Exception e) {
e.printStackTrace();
}
}*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public void itemStateChanged(ItemEvent evt) {
// Adding content to cards
String[] codes = OpcodeUtil.typeToCodes(type);
JComboBox<String> comboCodes = new JComboBox<>(codes);
card.add(new LabeledComponent("Opcode: ", comboCodes));
if (codes.length > 1) {
card.add(new LabeledComponent("Opcode: ", comboCodes));
}
typeToOpcodeSelector.put(key, comboCodes);
// Type specific content
switch (type) {
Expand Down

0 comments on commit dc2978e

Please sign in to comment.