From 084e1a746e25721f610ccddec2452cbf3307d87e Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Tue, 20 Jul 2021 21:42:24 +0200 Subject: [PATCH] Fixed #875 (drawing glitch) --- .../laybasic/layRedrawThreadWorker.cc | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/laybasic/laybasic/layRedrawThreadWorker.cc b/src/laybasic/laybasic/layRedrawThreadWorker.cc index 052380a38..310af056a 100644 --- a/src/laybasic/laybasic/layRedrawThreadWorker.cc +++ b/src/laybasic/laybasic/layRedrawThreadWorker.cc @@ -1909,17 +1909,21 @@ RedrawThreadWorker::draw_layer (int from_level, int to_level, db::cell_index_typ if ((dbbox.width () < 2.5 && dbbox.height () < 1.5) || (dbbox.width () < 1.5 && dbbox.height () < 2.5)) { - bool anything = true; - if (level == 0 && cell_bbox.inside (vp)) { - // Hint: on levels below 0 we know that there is anything. Otherwise we would not enter this procedure - // Hint: don't use any_text_shapes on partially visible cells because that will degrade performance - anything = any_shapes (ci, m_to_level - level); - } + if (bbox.overlaps (vp)) { - if (anything) { - // any shapes here: paint bbox for simplification - mp_renderer->draw (dbbox, 0, frame, vertex, 0); - } + bool anything = true; + if (level == 0) { + // Hint: on levels below 0 we know that there is anything. Otherwise we would not enter this procedure + // Hint: don't use any_text_shapes on partially visible cells because that will degrade performance + anything = any_shapes (ci, m_to_level - level); + } + + if (anything) { + // any shapes here: paint bbox for simplification + mp_renderer->draw (dbbox, 0, frame, vertex, 0); + } + + } } else {