Fix T47969: Select Random always uses same seed

Increment the seed on each use,
otherwise calling again selects the same order, unless you manually adjust the seed.
This commit is contained in:
2016-03-29 01:20:45 +11:00
parent d336bb0765
commit 28ca3ebc5f
8 changed files with 21 additions and 6 deletions

View File

@@ -1635,7 +1635,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
int k;
const float randfac = RNA_float_get (op->ptr, "percent") / 100.0f;
const int seed = RNA_int_get(op->ptr, "seed");
const int seed = WM_operator_properties_select_random_seed_increment_get(op);
const bool select = (RNA_enum_get(op->ptr, "action") == SEL_SELECT);
RNG *rng;