Issue 1144 (#1150)

* [CONSIDER MERGING] Clarification and typo fixed in DRC doc.

* Avoids a segfault during drawing: make sure the cell bbox update is not triggered in the drawing thread before it is stopped

* Fixed #1144 (wrong layer taken on copy layer)
This commit is contained in:
Matthias Köfferlein 2022-09-05 20:31:13 +02:00 committed by GitHub
parent f6c5062c71
commit 9ebb923d83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -78,11 +78,11 @@ LayoutStateModel::invalidate_bboxes (unsigned int index)
m_all_bboxes_dirty = true;
}
} else {
if (index >= (unsigned int) m_bboxes_dirty.size ()) {
m_bboxes_dirty.resize (index + 1, false);
}
if ((! m_all_bboxes_dirty && ! m_bboxes_dirty [index]) || m_busy) {
if ((! m_all_bboxes_dirty && (index >= (unsigned int) m_bboxes_dirty.size () || ! m_bboxes_dirty [index])) || m_busy) {
do_invalidate_bboxes (index); // must be called before the bboxes are invalidated (stopping of redraw thread requires this)
if (index >= (unsigned int) m_bboxes_dirty.size ()) {
m_bboxes_dirty.resize (index + 1, false);
}
m_bboxes_dirty [index] = true;
}
}

View File

@ -390,10 +390,8 @@ BEGIN_PROTECTED
mp_private->view->manager ()->commit ();
insertItem (index, tl::to_qstring (lp.to_string ()));
setCurrentIndex (index);
mp_private->layers.push_back (std::make_pair (lp, int (l)));
// NOTE: add_new_layers has triggered update_layer_list which already added the new layer
set_current_layer (lp);
}