forked from teamnwah/openmw-tes3coop
Fix names to be unique and condition values to be set to 0
This commit is contained in:
parent
bdc99048bb
commit
9d392487a9
2 changed files with 5 additions and 4 deletions
|
@ -274,9 +274,9 @@ namespace CSMWorld
|
||||||
{ ColumnId_InfoList, "Info List" },
|
{ ColumnId_InfoList, "Info List" },
|
||||||
{ ColumnId_InfoCondition, "Info Conditions" },
|
{ ColumnId_InfoCondition, "Info Conditions" },
|
||||||
{ ColumnId_InfoCondFunc, "Function" },
|
{ ColumnId_InfoCondFunc, "Function" },
|
||||||
{ ColumnId_InfoCondVar, "Name" },
|
{ ColumnId_InfoCondVar, "Variable/Object" },
|
||||||
{ ColumnId_InfoCondComp, "Relation" },
|
{ ColumnId_InfoCondComp, "Relation" },
|
||||||
{ ColumnId_InfoCondValue, "Value" },
|
{ ColumnId_InfoCondValue, "Values" },
|
||||||
{ ColumnId_OriginalCell, "Original Cell" },
|
{ ColumnId_OriginalCell, "Original Cell" },
|
||||||
|
|
||||||
{ ColumnId_NpcAttributes, "NPC Attributes" },
|
{ ColumnId_NpcAttributes, "NPC Attributes" },
|
||||||
|
|
|
@ -674,7 +674,8 @@ namespace CSMWorld
|
||||||
{
|
{
|
||||||
case ConstInfoSelectWrapper::Comparison_Numeric:
|
case ConstInfoSelectWrapper::Comparison_Numeric:
|
||||||
{
|
{
|
||||||
if (value.toInt(&conversionResult) && conversionResult)
|
// QVariant seems to have issues converting 0
|
||||||
|
if ((value.toInt(&conversionResult) && conversionResult) || value.toString().compare("0") == 0)
|
||||||
{
|
{
|
||||||
infoSelectWrapper.getVariant().setType(ESM::VT_Int);
|
infoSelectWrapper.getVariant().setType(ESM::VT_Int);
|
||||||
infoSelectWrapper.getVariant().setInteger(value.toInt());
|
infoSelectWrapper.getVariant().setInteger(value.toInt());
|
||||||
|
@ -689,7 +690,7 @@ namespace CSMWorld
|
||||||
case ConstInfoSelectWrapper::Comparison_Boolean:
|
case ConstInfoSelectWrapper::Comparison_Boolean:
|
||||||
case ConstInfoSelectWrapper::Comparison_Integer:
|
case ConstInfoSelectWrapper::Comparison_Integer:
|
||||||
{
|
{
|
||||||
if (value.toInt(&conversionResult) && conversionResult)
|
if ((value.toInt(&conversionResult) && conversionResult) || value.toString().compare("0") == 0)
|
||||||
{
|
{
|
||||||
infoSelectWrapper.getVariant().setType(ESM::VT_Int);
|
infoSelectWrapper.getVariant().setType(ESM::VT_Int);
|
||||||
infoSelectWrapper.getVariant().setInteger(value.toInt());
|
infoSelectWrapper.getVariant().setInteger(value.toInt());
|
||||||
|
|
Loading…
Reference in a new issue