diff --git a/qucs/extsimkernels/spicelibcompdialog.cpp b/qucs/extsimkernels/spicelibcompdialog.cpp index 93ae0655..2e2ff1b4 100644 --- a/qucs/extsimkernels/spicelibcompdialog.cpp +++ b/qucs/extsimkernels/spicelibcompdialog.cpp @@ -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(); } diff --git a/qucs/projectView.cpp b/qucs/projectView.cpp index 24f4878f..1d09e73b 100644 --- a/qucs/projectView.cpp +++ b/qucs/projectView.cpp @@ -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") ); @@ -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); } }