diff options
| -rw-r--r-- | gui/treemodel.h | 9 | ||||
| -rw-r--r-- | json/jsonparse.cc | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gui/treemodel.h b/gui/treemodel.h index 4c3f64c3..c3f9fe88 100644 --- a/gui/treemodel.h +++ b/gui/treemodel.h @@ -62,6 +62,8 @@ class Item void addChild(Item *child) { children_.append(child); } + void deleteChild(Item *child) { children_.removeAll(child); } + public: Item(QString name, Item *parent) : name_(name), parent_(parent) { @@ -100,7 +102,12 @@ class Item virtual bool canFetchMore() const { return false; } virtual void fetchMore() {} - ~Item() {} + ~Item() + { + if (parent_ != nullptr) { + parent_->deleteChild(this); + } + } }; // IdString is an Item that corresponds to a real element in Arch. diff --git a/json/jsonparse.cc b/json/jsonparse.cc index a0a4e8d0..89c2b8d9 100644 --- a/json/jsonparse.cc +++ b/json/jsonparse.cc @@ -462,9 +462,8 @@ void json_import_ports(Context *ctx, const string &modname, const std::vector<Id ground_net(ctx, net.get()); log_info(" Floating wire node value, " - "\'%s\' of port \'%s\' " - "in cell \'%s\' of module \'%s\'\n, converted to zero driver", - wire_node->data_string.c_str(), port_name.c_str(), obj_name.c_str(), modname.c_str()); + "'%s' on '%s'/'%s', converted to zero driver\n", + this_port.name.c_str(ctx), modname.c_str(), obj_name.c_str()); } else log_error(" Unknown fixed type wire node " |
