diff --git a/src/db/db/dbNetlistCompare.cc b/src/db/db/dbNetlistCompare.cc index 0af802934..dbcb61d3c 100644 --- a/src/db/db/dbNetlistCompare.cc +++ b/src/db/db/dbNetlistCompare.cc @@ -692,6 +692,12 @@ public: typedef std::pair, std::pair > edge_type; + static void swap_edges (edge_type &e1, edge_type &e2) + { + e1.first.swap (e2.first); + std::swap (e1.second, e2.second); + } + struct EdgeToEdgeOnlyCompare { bool operator() (const edge_type &a, const std::vector &b) const @@ -1149,17 +1155,22 @@ NetGraphNode::expand_subcircuit_nodes (NetGraph *graph) std::list sc_edges; - for (size_t i = 0; i < m_edges.size (); ) { - if (m_edges [i].second.second == 0) { + size_t ii = 0; + for (size_t i = 0; i < m_edges.size (); ++i) { + if (ii != i) { + swap_edges (m_edges [ii], m_edges [i]); + } + if (m_edges [ii].second.second == 0) { // subcircuit pin - sc_edges.push_back (m_edges [i]); - m_edges.erase (m_edges.begin () + i); + sc_edges.push_back (m_edges [ii]); } else { - n2entry.insert (std::make_pair (m_edges [i].second.second, i)); - ++i; + n2entry.insert (std::make_pair (m_edges [ii].second.second, ii)); + ++ii; } } + m_edges.erase (m_edges.begin () + ii, m_edges.end ()); + for (std::list::const_iterator e = sc_edges.begin (); e != sc_edges.end (); ++e) { const db::SubCircuit *sc = 0; diff --git a/src/edt/edt/PCellParametersDialog.ui b/src/edt/edt/PCellParametersDialog.ui index ddfe5ab55..be3b83cde 100644 --- a/src/edt/edt/PCellParametersDialog.ui +++ b/src/edt/edt/PCellParametersDialog.ui @@ -11,7 +11,7 @@ - Instantiation Path + PCell Parameters diff --git a/src/lay/lay/TechBaseEditorPage.ui b/src/lay/lay/TechBaseEditorPage.ui index 99267f779..059659437 100644 --- a/src/lay/lay/TechBaseEditorPage.ui +++ b/src/lay/lay/TechBaseEditorPage.ui @@ -6,14 +6,48 @@ 0 0 - 568 - 353 + 604 + 498 Form + + + + ... + + + + + + + + + + Name + + + + + + + false + + + + + + + The base path is used to locate auxiliary files if those are specified with a relative path. If none is specified, the default path is used. The default path is the one from which a technology was imported. + + + true + + + @@ -21,9 +55,6 @@ - - - @@ -40,135 +71,6 @@ - - - - QFrame::NoFrame - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - - - - µm - - - - - - - - - - Qt::Vertical - - - - 0 - 27 - - - - - - - - Qt::Horizontal - - - - - - - The base path is used to locate auxiliary files if those are specified with a relative path. If none is specified, the default path is used. The default path is the one from which a technology was imported. - - - true - - - - - - - Base path - - - - - - - Qt::Horizontal - - - - - - - ... - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Name - - - - - - - false - - - - - - - (Use the rename button to change this) - - - - - - @@ -223,10 +125,10 @@ - - + + - The default database unit is used as database unit for freshly created layouts + Base path @@ -252,6 +154,127 @@ unit + + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + + + + + (Use the rename button to change this) + + + + + + + The default database unit is used as database unit for freshly created layouts + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + + + + µm + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Technology +specific +libraries + + + + + + + Qt::Horizontal + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + QAbstractItemView::NoSelection + + + diff --git a/src/lay/lay/layMainWindow.cc b/src/lay/lay/layMainWindow.cc index 67475dff5..3ae39ec3d 100644 --- a/src/lay/lay/layMainWindow.cc +++ b/src/lay/lay/layMainWindow.cc @@ -2414,7 +2414,6 @@ MainWindow::cm_undo () (*vp)->cancel (); } m_manager.undo (); - current_view ()->update_content (); } END_PROTECTED @@ -2431,7 +2430,6 @@ MainWindow::cm_redo () (*vp)->cancel (); } m_manager.redo (); - current_view ()->update_content (); } END_PROTECTED diff --git a/src/lay/lay/layTechSetupDialog.cc b/src/lay/lay/layTechSetupDialog.cc index 89454c5d1..0e881fd0b 100644 --- a/src/lay/lay/layTechSetupDialog.cc +++ b/src/lay/lay/layTechSetupDialog.cc @@ -37,6 +37,8 @@ #include "tlStream.h" #include "tlClassRegistry.h" #include "dbStream.h" +#include "dbLibraryManager.h" +#include "dbLibrary.h" #include "ui_TechSetupDialog.h" #include "ui_TechMacrosPage.h" @@ -51,6 +53,7 @@ #include #include #include +#include #include #include @@ -114,6 +117,38 @@ TechBaseEditorPage::setup () mp_ui->lyp_grp->setChecked (! lyp.empty ()); mp_ui->lyp_le->setText (tl::to_qstring (lyp)); mp_ui->add_other_layers_cbx->setChecked (tech ()->add_other_layers ()); + + mp_ui->libs_lw->clear (); + + if (! tech ()->name ().empty ()) { + + mp_ui->libs_lbl->setEnabled (true); + mp_ui->libs_lw->setEnabled (true); + + std::vector libs; + + for (db::LibraryManager::iterator l = db::LibraryManager::instance ().begin (); l != db::LibraryManager::instance ().end (); ++l) { + const db::Library *lib = db::LibraryManager::instance ().lib (l->second); + if (lib->get_technology () == tech ()->name ()) { + std::string text = lib->get_name (); + if (! lib->get_description ().empty ()) { + text += " - " + lib->get_description (); + } + libs.push_back (text); + } + } + + std::sort (libs.begin (), libs.end ()); + + for (std::vector::const_iterator l = libs.begin (); l != libs.end (); ++l) { + mp_ui->libs_lw->addItem (new QListWidgetItem (tl::to_qstring (*l))); + } + + } else { + mp_ui->libs_lbl->setEnabled (false); + mp_ui->libs_lw->setEnabled (false); + mp_ui->libs_lw->addItem (tr ("The default technology can't have libraries")); + } } void diff --git a/src/laybasic/laybasic/layLayoutView.cc b/src/laybasic/laybasic/layLayoutView.cc index 3930c678c..3249333e9 100644 --- a/src/laybasic/laybasic/layLayoutView.cc +++ b/src/laybasic/laybasic/layLayoutView.cc @@ -1706,9 +1706,12 @@ LayoutView::insert_layer_list (unsigned index, const LayerPropertiesList &props) m_current_layer_list = index; current_layer_list_changed_event (index); + layer_list_inserted_event (index); redraw (); + + dm_prop_changed (); } void @@ -1750,6 +1753,7 @@ LayoutView::delete_layer_list (unsigned index) } layer_list_deleted_event (index); + dm_prop_changed (); } void @@ -1986,6 +1990,7 @@ LayoutView::insert_layer (unsigned int index, const LayerPropertiesConstIterator if (index == current_layer_list ()) { layer_list_changed_event (2); redraw (); + dm_prop_changed (); } return ret; @@ -2013,6 +2018,7 @@ LayoutView::delete_layer (unsigned int index, LayerPropertiesConstIterator &iter if (index == current_layer_list ()) { layer_list_changed_event (2); redraw (); + dm_prop_changed (); } // invalidate the iterator so it can be used to refer to the next element diff --git a/src/laybasic/laybasic/layLibrariesView.cc b/src/laybasic/laybasic/layLibrariesView.cc index d0bc69894..2e9d44483 100644 --- a/src/laybasic/laybasic/layLibrariesView.cc +++ b/src/laybasic/laybasic/layLibrariesView.cc @@ -588,10 +588,6 @@ LibrariesView::do_update_content (int lib_index) m_force_close [i] = true; } - if (m_needs_update [i]) { - mp_cell_lists [i]->doItemsLayout (); // triggers a redraw - } - m_libraries [i].reset (libraries [i]); } @@ -715,6 +711,8 @@ LibrariesView::do_update_content (int lib_index) m_needs_update [i] = false; + mp_cell_lists [i]->doItemsLayout (); // triggers a redraw -> the model might need this + } mp_cell_list_headers [i]->setVisible (split_mode && m_libraries.size () > 1); @@ -795,6 +793,10 @@ LibrariesView::display_string (int n) const if (! lib->get_description ().empty ()) { text += " - " + lib->get_description (); } + if (! lib->get_technology ().empty ()) { + text += " "; + text += tl::to_string (QObject::tr ("[Technology %1]").arg (tl::to_qstring (lib->get_technology ()))); + } return text; }