Skip to content

Commit

Permalink
Fix UI bug when view-stall after view-item
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruizhi2001 committed Oct 25, 2023
1 parent daa95a4 commit 862e1b5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

import seedu.address.model.Model;

/**
* Sorts all stalls by location in alphabetical order.
*/
public class SortStallLocationCommand extends Command {

public static final String COMMAND_WORD = "sort-stalls-locations";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

import seedu.address.model.Model;

/**
* Sorts all stalls by location in alphabetical order.
*/
public class SortStallRatingCommand extends Command {

public static final String COMMAND_WORD = "sort-stalls-ratings";
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/model/stall/Stall.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import java.util.Objects;

import seedu.address.commons.core.index.Index;
import javafx.collections.ObservableList;
import seedu.address.commons.core.index.Index;
import seedu.address.commons.util.ToStringBuilder;
import seedu.address.model.item.Item;
import seedu.address.model.stall.review.StallReview;
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/seedu/address/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ private void handleExit() {
@FXML
public void handleIsStallDetail() {
oneStallPanel = new OneStallPanel(logic.getTempFilteredStallList());
stallListPanel = new StallListPanel(logic.getFilteredStallList());
leftMainPanel.getChildren().clear();
leftMainPanel.getChildren().add(stallListPanel.getRoot());
rightMainPanel.getChildren().clear();
rightMainPanel.getChildren().add(oneStallPanel.getRoot());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
import java.util.Arrays;
import java.util.function.Predicate;

import javafx.collections.ObservableList;
import org.junit.jupiter.api.Test;

import javafx.collections.ObservableList;
import seedu.address.commons.core.GuiSettings;
import seedu.address.commons.core.index.Index;
import seedu.address.logic.Messages;
Expand All @@ -26,7 +27,6 @@
import seedu.address.model.item.review.ItemReview;
import seedu.address.model.stall.Stall;
import seedu.address.testutil.StallBuilder;

public class AddStallCommandTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import seedu.address.model.Model;
import seedu.address.model.ModelManager;
import seedu.address.model.UserPrefs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import seedu.address.model.Model;
import seedu.address.model.ModelManager;
import seedu.address.model.UserPrefs;
Expand Down

0 comments on commit 862e1b5

Please sign in to comment.