Skip to content

Commit

Permalink
Merge pull request #969 from ra3xdh/968_fix
Browse files Browse the repository at this point in the history
Fix simulation properties edition
  • Loading branch information
ra3xdh authored Sep 28, 2024
2 parents 16d4e42 + 684b06a commit f5b15fa
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions qucs/components/componentdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,11 +1525,20 @@ void ComponentDialog::fillPropsFromTable()
QString disp = prop->item(row, 2)->text();
QString desc = prop->item(row, 3)->text();
bool display = (disp == tr("yes"));
if (row < Comp->Props.count()) {
auto pp = Comp->Props[row];
if (pp->Name == name) {
if (compIsSimulation) {
// Get property by name
auto pp = Comp->getProperty(name);
if (pp != nullptr) {
updateProperty(pp,value,display);
}
} else {
// Other components may have properties with duplicate names
if (row < Comp->Props.count()) {
auto pp = Comp->Props[row];
if (pp->Name == name) {
updateProperty(pp,value,display);
}
}
}
}
}
Expand Down

0 comments on commit f5b15fa

Please sign in to comment.