Page MenuHome
Paste P670

Masterwork From Distant Lands
ActivePublic

Authored by Dalai Felinto (dfelinto) on May 2 2018, 6:26 PM.
commit 4f2cbb57400db57d168ccf5753cb41f169662bff
Author: Dalai Felinto <dfelinto@gmail.com>
Date: Wed May 2 18:22:09 2018 +0200
Fix T54864: Assert when changing interface display scale
The asserts were introduced on rB5f6c45498c92 (top-bar).
Although the asserts are technically correct, they would fail even in master.
And the commit simply added the asserts without fixing the situation itself
(as you can see in the report, it is really simple to reproduce this issue).
I propose we remove the asserts and bring them back only when the situation
itself is fixed. It doesn't make sense to introduce asserts that would fail
with the current state of the code.
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 5e68ad1218d..7b180f56bdc 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1449,10 +1449,6 @@ static void area_calc_totrct(ScrArea *sa, int window_size_x, int window_size_y)
if (sa->totrct.ymax < (window_size_y - 1)) {
sa->totrct.ymax -= px;
}
- BLI_assert(sa->totrct.xmin >= 0);
- BLI_assert(sa->totrct.xmax >= 0);
- BLI_assert(sa->totrct.ymin >= 0);
- BLI_assert(sa->totrct.ymax >= 0);
/* for speedup */
sa->winx = BLI_rcti_size_x(&sa->totrct) + 1;

Event Timeline

Dalai Felinto (dfelinto) changed the title of this paste from untitled to Masterwork From Distant Lands.
Dalai Felinto (dfelinto) updated the paste's language from autodetect to autodetect.