Skip to content

Commit

Permalink
Merge pull request #150 from gehelem/149-switchrule-is-ko
Browse files Browse the repository at this point in the history
switchrule is ok if autoupdate is on
  • Loading branch information
gehelem authored Dec 6, 2024
2 parents 24c2e6b + 1b65271 commit 92eb1e2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion libs/basemodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ void Basemodule::OnExternalEvent(const QString &pEventType, const QString &pEve
}
if (getEltBase(keyprop, keyelt)->getType() == "bool")
{
getEltBool(keyprop, keyelt)->setValue(v.toBool(), true);
//a boolean need to be updated on property level because of SwitchRule's flag behaviour
getProperty(keyprop)->setElt(keyelt, v);

}
if (getEltBase(keyprop, keyelt)->getType() == "date")
{
Expand Down
2 changes: 1 addition & 1 deletion libs/model/property/propertymulti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ bool PropertyMulti::setElt(QString key, QVariant val)
return true;

}
sendError("PropertyMulti::setValue - " + key + " - OneOfMany - can't just unset");
sendWarning("PropertyMulti::setValue - " + key + " - OneOfMany - can't just unset");
return false;
break;
case AtMostOne:
Expand Down
2 changes: 1 addition & 1 deletion src/modules/dummy/dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ void Dummy::OnMyExternalEvent(const QString &eventType, const QString &eventMod
// test max gridlimit
getProperty("secondtestgrid")->clearGrid();
getProperty("secondtestgrid")->setGridLimit(1010);
for ( int i = 0; i < 1010; i++)getProperty("secondtestgrid")->push();
//for ( int i = 0; i < 1010; i++)getProperty("secondtestgrid")->push();
}
}
if (keyprop == "devices")
Expand Down

0 comments on commit 92eb1e2

Please sign in to comment.