fix negative condition for panel content on variable value
This commit is contained in:
parent
99579eea94
commit
6e7def937f
1 changed files with 4 additions and 0 deletions
|
@ -237,6 +237,8 @@ static bool CanShowContent(const ConditionPanel *condition, const CUnit &unit)
|
|||
if (f >= -v) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if (v > CONDITION_ONLY) {
|
||||
// only show for more than (v-CONDITION_ONLY)%
|
||||
|
@ -245,6 +247,8 @@ static bool CanShowContent(const ConditionPanel *condition, const CUnit &unit)
|
|||
if (f <= v - CONDITION_ONLY) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else if (v != CONDITION_TRUE) {
|
||||
if ((v == CONDITION_ONLY) ^ unit.Variable[i].Enable) {
|
||||
|
|
Loading…
Add table
Reference in a new issue