Track expression dependencies (#2113)
This commit is contained in:
@@ -353,7 +353,7 @@ void testHasOverrides(LayoutType& layout) {
|
||||
|
||||
// Expression, overridden text-color.
|
||||
FormatExpressionSection section(literal(""));
|
||||
section.setTextSectionOptions(std::nullopt, std::nullopt, toColor(literal("red")));
|
||||
section.setTextSectionOptions({}, {}, toColor(literal("red")));
|
||||
auto formatExprOverride = std::make_unique<FormatExpression>(std::vector<FormatExpressionSection>{section});
|
||||
PropertyExpression<Formatted> propExprOverride(std::move(formatExprOverride));
|
||||
layout.template get<TextField>() = PropertyValueType<Formatted>(std::move(propExprOverride));
|
||||
@@ -362,7 +362,7 @@ void testHasOverrides(LayoutType& layout) {
|
||||
// Nested expressions, overridden text-color.
|
||||
auto formattedExpr1 = format("first paragraph");
|
||||
FormatExpressionSection secondParagraph(literal("second paragraph"));
|
||||
secondParagraph.setTextSectionOptions(std::nullopt, std::nullopt, toColor(literal("blue")));
|
||||
secondParagraph.setTextSectionOptions({}, {}, toColor(literal("blue")));
|
||||
std::vector<FormatExpressionSection> sections{{std::move(secondParagraph)}};
|
||||
auto formattedExpr2 = std::make_unique<FormatExpression>(std::move(sections));
|
||||
std::unordered_map<std::string, std::shared_ptr<Expression>> branches{{"1st", std::move(formattedExpr1)},
|
||||
|
||||
Reference in New Issue
Block a user