Skip to content

Commit

Permalink
libdeng2|Fixed: OperatorRule's value not calculated
Browse files Browse the repository at this point in the history
OperatorRule must be marked invalid at construction.
  • Loading branch information
skyjake committed Jan 23, 2013
1 parent 658e004 commit c92d630
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions doomsday/libdeng2/src/widgets/operatorrule.cpp
Expand Up @@ -28,6 +28,7 @@ OperatorRule::OperatorRule(Operator op, Rule const *unary)
DENG2_ASSERT(_leftOperand != 0);

dependsOn(_leftOperand);
invalidate();
}

OperatorRule::OperatorRule(Operator op, Rule const *left, Rule const *right)
Expand All @@ -38,6 +39,7 @@ OperatorRule::OperatorRule(Operator op, Rule const *left, Rule const *right)

dependsOn(_leftOperand);
dependsOn(_rightOperand);
invalidate();
}

OperatorRule::~OperatorRule()
Expand Down
6 changes: 3 additions & 3 deletions doomsday/tools/shell/shell-text/src/shellapp.cpp
Expand Up @@ -31,10 +31,10 @@ struct ShellApp::Instance
logWidget = new LogWidget;

ScalarRule *anim = de::refless(new ScalarRule(0));
/*anim->set(de::refless(new de::OperatorRule(de::OperatorRule::Divide,
anim->set(de::refless(new de::OperatorRule(de::OperatorRule::Divide,
self.rootWidget().viewWidth(),
de::refless(new ConstantRule(2)))), 2);*/
anim->set(de::refless(new de::ConstantRule(10)), 2);
de::refless(new ConstantRule(2)))), 2);
/*anim->set(de::refless(new de::ConstantRule(10)), 2);*/

logWidget->rule()
.setInput(RectangleRule::Left, anim)
Expand Down

0 comments on commit c92d630

Please sign in to comment.