Skip to content

Commit

Permalink
Keep state when tree refreshes
Browse files Browse the repository at this point in the history
  • Loading branch information
barreeeiroo committed Oct 24, 2023
1 parent 033bbb2 commit 6993d7f
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
public final class MockForm extends MockContainer {
private static final Logger LOG = Logger.getLogger(MockForm.class.getName());

private Integer view = 1;

/*
* Widget for the mock form title bar.
*/
Expand Down Expand Up @@ -1341,7 +1343,7 @@ public final void setPasteTarget(MockContainer target) {
* @return tree showing the component hierarchy of the form
*/
public TreeItem buildComponentsTree() {
return buildComponentsTree(1);
return buildComponentsTree(view);
}

/**
Expand All @@ -1351,9 +1353,14 @@ public TreeItem buildComponentsTree() {
* @return tree showing the component hierarchy of the form
*/
public TreeItem buildComponentsTree(Integer view) {
this.view = view;
return buildTree(view);
}

public Integer getView() {
return this.view;
}

// PropertyChangeListener implementation

@Override
Expand Down

0 comments on commit 6993d7f

Please sign in to comment.