Skip to content

Commit

Permalink
imp schematic: make power net classes read-only in non-top blocks
Browse files Browse the repository at this point in the history
since they'd get reverted durign rebuild
power net classes are to be set in the top block only

changelog: Bugfixes/Schematic Editor: disallow changing power net netclasses in non-top blocks
  • Loading branch information
carrotIndustries committed Aug 29, 2023
1 parent bd91a8d commit 5c1a25a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/core_schematic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,9 @@ bool CoreSchematic::get_property_meta(ObjectType type, const UUID &uu, ObjectPro

case ObjectProperty::ID::NET_CLASS: {
PropertyMetaNetClasses &m = dynamic_cast<PropertyMetaNetClasses &>(meta);
const auto &net = get_current_block()->nets.at(uu);
if (net.is_power)
meta.is_settable = current_block_is_top();
m.net_classes.clear();
for (const auto &it : get_current_block()->net_classes) {
m.net_classes.emplace(it.first, it.second.name);
Expand Down

0 comments on commit 5c1a25a

Please sign in to comment.