Skip to content

Commit

Permalink
Merge pull request nus-cs2103-AY2122S1#87 from rohit0718/update/summa…
Browse files Browse the repository at this point in the history
…ry-numbering

Add summary numbering
  • Loading branch information
luminousleek authored Oct 14, 2021
2 parents cf8e745 + cece6db commit 6165000
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/ui/ModuleListPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected void updateItem(Module module, boolean empty) {
setGraphic(null);
setText(null);
} else {
setGraphic(new ModuleSummaryCard(module).getRoot());
setGraphic(new ModuleSummaryCard(module, getIndex() + 1).getRoot());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/ui/ModuleSummaryCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ public class ModuleSummaryCard extends UiPart<Region> {
/**
* Creates a {@code ModuleCode} with the given {@code Module} and index to display.
*/
public ModuleSummaryCard(Module module) {
public ModuleSummaryCard(Module module, int displayedIndex) {
super(FXML);
this.module = module;
id.setText(displayedIndex + ". ");
String moduleHeader = module.getCode().toString();

if (module.getName().isPresent()) {
moduleHeader += String.format(" %s", module.getName().get());
}
Expand Down

0 comments on commit 6165000

Please sign in to comment.