Bug fixes
This commit is contained in:
parent
3cbe947408
commit
f6aaebafc6
5 changed files with 20 additions and 5 deletions
|
|
@ -128,6 +128,12 @@ bool Item::removeActor(Actor* actor)
|
|||
return false;
|
||||
}
|
||||
|
||||
void Item::removeAllActors()
|
||||
{
|
||||
for(unsigned int i = 0; i < actors_.size(); i++) delete actors_[i];
|
||||
actors_.clear();
|
||||
}
|
||||
|
||||
std::vector< Actor* >& Item::getActors()
|
||||
{
|
||||
return actors_;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ public:
|
|||
bool hasActors();
|
||||
void addActor(Actor* actor);
|
||||
bool removeActor(Actor* actor);
|
||||
void removeAllActors();
|
||||
bool actorsActive() const;
|
||||
void setActorsActive(bool in);
|
||||
void informValue(uint8_t value);
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ void ItemStore::load(const QJsonObject& json, Microcontroller * const micro)
|
|||
if(itemsArray[i].isObject())
|
||||
{
|
||||
const QJsonObject itemObject = itemsArray[i].toObject();
|
||||
if(!itemObject["Name"].isObject()) qDebug()<<"no name";
|
||||
std::shared_ptr<Relay> newItem;
|
||||
if(itemObject["Type"].toString("") == "Relay")
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue