Skip to content

Commit

Permalink
Don't push computed tabSectionContents to the d2wContext as this may …
Browse files Browse the repository at this point in the history
…cause stale values to be used. E.g. when switching from inspect to edit causes the displayPropertyKeys to change. For the same reason, reset _currentTab when clearTabSectionsContents is called.
  • Loading branch information
fbarthez committed Nov 12, 2015
1 parent 9c62945 commit 83f63ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,6 @@ public NSArray<ERD2WContainer> tabSectionsContents() {
_tabSectionsContents = tabSectionsContentsFromRuleResult(tabSectionContentsFromRule);
ERXStats.markEnd("D2W", statsKey);

d2wContext().takeValueForKey(tabSectionContentsFromRule, "tabSectionsContents");
// Once calculated we then determine any displayNameForTabKey
String currentTabKey = (String) d2wContext().valueForKey(Keys.tabKey);
for (Enumeration e = _tabSectionsContents.objectEnumerator(); e.hasMoreElements();) {
Expand All @@ -977,6 +976,7 @@ public NSArray<ERD2WContainer> tabSectionsContents() {
*/
protected void clearTabSectionsContents() {
_tabSectionsContents = null;
_currentTab = null;
}

/** Dummy denoting to sections. */
Expand Down

0 comments on commit 83f63ac

Please sign in to comment.