Page MenuHome

Fix T76665: Wrong files selected when using box select
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on May 12 2020, 3:54 PM.

Details

Summary

The main issue for me here is that it is not clearly defined what layout->rows and layout->flow_columns
are. Are they the number of rows/columns used by actual elements, or the number of visible rows/columns?

I assume, this very old XXX comment referred to the modulo in ED_fileselect_layout_tilepos.

This code was introduced in https://developer.blender.org/rB403b3763a8048f88f8f589167c1f70b876999795#change-ShDQCqWFZyae.

Diff Detail

Repository
rB Blender
Branch
wrong-box-select (branched from master)
Build Status
Buildable 8016
Build 8016: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.May 12 2020, 3:54 PM
Jacques Lucke (JacquesLucke) created this revision.

One issue to be fixed, but seems fine besides that.

source/blender/blenlib/intern/math_base_inline.c
361

Fails to compile here on Apple Clang, because of undefined type uint. I had to include "BLI_sys_types.h".

Why is this using unsigned anyway? There are probably plenty of hidden bugs in Blender because of unsigned-signed comparisons, and I know Sergey is quite against using them too.

This revision is now accepted and ready to land.May 12 2020, 7:11 PM
source/blender/blenlib/intern/math_base_inline.c
361

I made it unsigned, because I was too lazy to find a version that works correctly for negative and positive numbers. Also, I don't a case where this behavior would be useful for negative values.