Skip to content

Commit

Permalink
Fix editing File type property
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed Sep 17, 2024
1 parent 265fae5 commit 1592d07
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions qucs/components/componentdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,9 @@ void ComponentDialog::slotBrowseFile()
s = file.fileName();
}
edit->setText(s);
int row = prop->currentRow();
prop->item(row,1)->setText(s);
}
/* FIX
prop->currentItem()->setText(1, s); */
}

// -------------------------------------------------------------------------
Expand Down Expand Up @@ -1525,8 +1525,12 @@ void ComponentDialog::fillPropsFromTable()
QString disp = prop->item(row, 2)->text();
QString desc = prop->item(row, 3)->text();
bool display = (disp == tr("yes"));
auto pp = Comp->getProperty(name);
updateProperty(pp,value,display);
if (row < Comp->Props.count()) {
auto pp = Comp->Props[row];
if (pp->Name == name) {
updateProperty(pp,value,display);
}
}
}
}

Expand Down

0 comments on commit 1592d07

Please sign in to comment.