mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-08 04:08:14 +02:00
A couple of enhancements and bugfixes found during issue-1059 research (#1062)
* Opportunity fix: library selection box listed libraries with technology even though no technology is selected. * Opportunity: show PCell errors on new error layer. Previously, errors were only shown when the PCell had at least a single layer parameter The error text is drawn together with guiding shapes. Disabling guiding shapes will turn off error display. * Opportunity: fixed an issue when reloading a library immediately after loading a layout: in this case, the library connection got lost and cells were substituted by static ones * Opportunity: added a layout cleanup for the following case: a layout is loaded without the library present - giving defunct cells. Then the library is registered and defunct cells are reconnected.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="margin" stdset="0">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -29,7 +29,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="margin" stdset="0">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
@@ -47,7 +47,7 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="margin" stdset="0">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -84,7 +84,7 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="margin" stdset="0">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -122,7 +122,7 @@
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<property name="margin" stdset="0">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -220,13 +220,13 @@
|
||||
<item>
|
||||
<widget class="QGroupBox" name="pcell_gs_group">
|
||||
<property name="title">
|
||||
<string>Show PCell guiding shapes</string>
|
||||
<string>Show PCell guiding and error shapes</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout">
|
||||
<property name="margin">
|
||||
<property name="margin" stdset="0">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
||||
@@ -160,6 +160,21 @@ void render_cell_inst (const db::Layout &layout, const db::CellInstArray &inst,
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
// render error layer
|
||||
|
||||
db::RecursiveShapeIterator shapes (layout, cell, layout.error_layer ());
|
||||
while (! shapes.at_end ()) {
|
||||
|
||||
for (db::CellInstArray::iterator arr = inst.begin (); ! arr.at_end (); ++arr) {
|
||||
r.draw (*shapes, tr * inst.complex_trans (*arr) * shapes.trans (), fill, contour, 0 /*use vertex for origin*/, text);
|
||||
}
|
||||
|
||||
++shapes;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// render the origins
|
||||
if (render_origins && vertex) {
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ RedrawThreadWorker::perform_task (tl::Task *task)
|
||||
}
|
||||
}
|
||||
|
||||
// draw the guiding shapes
|
||||
// draw the guiding and error shapes
|
||||
for (std::set< std::pair<db::DCplxTrans, int> >::const_iterator b = m_box_variants.begin (); b != m_box_variants.end (); ++b) {
|
||||
|
||||
const lay::CellView &cv = m_cellviews [b->second];
|
||||
@@ -374,8 +374,6 @@ RedrawThreadWorker::perform_task (tl::Task *task)
|
||||
// draw one level more to show the guiding shapes as part of the instance
|
||||
m_to_level += 1; // TODO: modifying this basic setting is a hack!
|
||||
|
||||
m_layer = mp_layout->guiding_shape_layer ();
|
||||
|
||||
// configure renderer ..
|
||||
mp_renderer->draw_texts (m_text_visible);
|
||||
mp_renderer->draw_properties (false);
|
||||
@@ -384,13 +382,30 @@ RedrawThreadWorker::perform_task (tl::Task *task)
|
||||
mp_renderer->set_font (db::Font (m_text_font));
|
||||
mp_renderer->apply_text_trans (m_apply_text_trans);
|
||||
|
||||
bool f = m_text_lazy_rendering;
|
||||
|
||||
try {
|
||||
|
||||
m_text_lazy_rendering = false;
|
||||
|
||||
m_layer = mp_layout->guiding_shape_layer ();
|
||||
iterate_variants (m_redraw_region, cv.cell_index (), trans, &RedrawThreadWorker::draw_layer);
|
||||
iterate_variants (text_redraw_regions, cv.cell_index (), trans, &RedrawThreadWorker::draw_text_layer);
|
||||
|
||||
m_layer = mp_layout->error_layer ();
|
||||
iterate_variants (m_redraw_region, cv.cell_index (), trans, &RedrawThreadWorker::draw_layer);
|
||||
iterate_variants (text_redraw_regions, cv.cell_index (), trans, &RedrawThreadWorker::draw_text_layer);
|
||||
|
||||
m_text_lazy_rendering = f;
|
||||
m_to_level -= 1;
|
||||
|
||||
} catch (...) {
|
||||
|
||||
m_text_lazy_rendering = f;
|
||||
m_to_level -= 1;
|
||||
|
||||
throw;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user