Skip to content

Commit

Permalink
Add symbols group; fix warning on empty sym file
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed Jul 4, 2024
1 parent fe13058 commit 0b477ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions qucs/extsimkernels/spicelibcompdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,10 @@ void SpiceLibCompDialog::slotSetSymbol()
listSymPattern->setEnabled(false);
edtSymFile->setEnabled(true);
btnOpenSym->setEnabled(true);
if (edtSymFile->text().isEmpty()) {
symbolPinsCount = 0;
return;
}
result = symbol->loadSymFile(edtSymFile->text());
symbolPinsCount = symbol->getPortsNumber();
}
Expand Down
10 changes: 6 additions & 4 deletions qucs/projectView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ ProjectView::refresh()
APPEND_ROW(m_model, tr("VHDL") );
APPEND_ROW(m_model, tr("Octave") );
APPEND_ROW(m_model, tr("Schematics") );
APPEND_ROW(m_model, tr("Symbols") );
APPEND_ROW(m_model, tr("SPICE") );
APPEND_ROW(m_model, tr("Others") );

Expand Down Expand Up @@ -139,13 +140,14 @@ ProjectView::refresh()
}
APPEND_CHILD(6, columnData);
}
}
else if ((extName == "cir") || (extName=="ckt") ||
(extName=="sp")) {
} else if (extName == "sym") {
APPEND_CHILD(7,columnData);
} else if ((extName == "cir") || (extName=="ckt") ||
(extName=="sp")) {
APPEND_CHILD(8,columnData);
}
else {
APPEND_CHILD(8, columnData);
APPEND_CHILD(9, columnData);
}
}

Expand Down

0 comments on commit 0b477ea

Please sign in to comment.