Fix names to be unique and condition values to be set to 0

move
Aesylwinn 9 years ago
parent bdc99048bb
commit 9d392487a9

@ -274,9 +274,9 @@ namespace CSMWorld
{ ColumnId_InfoList, "Info List" },
{ ColumnId_InfoCondition, "Info Conditions" },
{ ColumnId_InfoCondFunc, "Function" },
{ ColumnId_InfoCondVar, "Name" },
{ ColumnId_InfoCondVar, "Variable/Object" },
{ ColumnId_InfoCondComp, "Relation" },
{ ColumnId_InfoCondValue, "Value" },
{ ColumnId_InfoCondValue, "Values" },
{ ColumnId_OriginalCell, "Original Cell" },
{ ColumnId_NpcAttributes, "NPC Attributes" },

@ -674,7 +674,8 @@ namespace CSMWorld
{
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().setInteger(value.toInt());
@ -689,7 +690,7 @@ namespace CSMWorld
case ConstInfoSelectWrapper::Comparison_Boolean:
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().setInteger(value.toInt());

Loading…
Cancel
Save