Skip to content

Commit

Permalink
refresh internal widget collection on sitemap change
Browse files Browse the repository at this point in the history
This partially reverts eclipse-archived#3846.

fixes eclipse-archived#5522
Signed-off-by: Simon Kaufmann <simon.kfm@googlemail.com>
  • Loading branch information
sjsf committed May 2, 2018
1 parent db9f5ff commit 0b03add
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -281,9 +281,11 @@ public void modelChanged(String modelName, EventType type) {
for (Entry<String, PageChangeListener> listenerEntry : pageChangeListeners.entrySet()) {
String sitemapWithPage = listenerEntry.getKey();
String sitemapName = extractSitemapName(sitemapWithPage);
String pageId = extractPageId(sitemapWithPage);

if (sitemapName.equals(changedSitemapName)) {
listenerEntry.getValue().sitemapContentChanged();
EList<Widget> widgets = collectWidgets(sitemapName, pageId);
listenerEntry.getValue().sitemapContentChanged(widgets);
}
}
}
Expand Down
Expand Up @@ -257,7 +257,9 @@ private boolean definesVisibilityOrColor(Widget w, String name) {
return false;
}

public void sitemapContentChanged() {
public void sitemapContentChanged(EList<Widget> widgets) {
updateItemsAndWidgets(widgets);

SitemapChangedEvent changeEvent = new SitemapChangedEvent();
changeEvent.pageId = pageId;
changeEvent.sitemapName = sitemapName;
Expand Down

0 comments on commit 0b03add

Please sign in to comment.