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 authored and darkv committed Nov 29, 2015
1 parent dcf3259 commit 1c86f5b
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 1c86f5b

Please sign in to comment.