forked from mirror/openmw-tes3mp
in filters allow specifiying boolean columns as strings
This commit is contained in:
parent
9cb121bd04
commit
1744a64f77
2 changed files with 5 additions and 1 deletions
|
@ -120,7 +120,7 @@ CSMFilter::Token CSMFilter::Parser::getStringToken()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string[0]=='"')
|
if (string[0]=='"')
|
||||||
string = string.substr (1, string.size()-2);
|
return string.substr (1, string.size()-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return checkKeywords (string);
|
return checkKeywords (string);
|
||||||
|
|
|
@ -45,6 +45,10 @@ bool CSMFilter::TextNode::test (const CSMWorld::IdTable& table, int row,
|
||||||
if (value>=0 && value<static_cast<int> (enums.size()))
|
if (value>=0 && value<static_cast<int> (enums.size()))
|
||||||
string = QString::fromUtf8 (enums[value].c_str());
|
string = QString::fromUtf8 (enums[value].c_str());
|
||||||
}
|
}
|
||||||
|
else if (data.type()==QVariant::Bool)
|
||||||
|
{
|
||||||
|
string = data.toBool() ? "true" : " false";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue