pcb

Comment 9 for bug 929123

Revision history for this message
Chad Parker (parker-charles) wrote :

I've identified the problem(s). There are several places in the code path where a value of 0 used to indicate that the change should be relative instead of absolute.

When the action is called with the key strokes ctrl-k or ctrl-K, the "delta" argument get's set to a sign, either "+" or "-". When GetValue interprets this, it returns a value of 0. In ActionChangeClearSize, there's a statement, if(value == 0) ... that detects this, and assumes that it means that the function was called via keystroke. If you deliberately set this value to zero, then it gets misdetected.

Then in change.c, ChangeSelectedClearSize, "Absolute" is set to zero if "absolute" was detected properly in ActionChangeClearSize. In ChangeViaMaskSize, the zero-ness of "Absolute" is again used to detect if this should be a relative or absolute change.

There are several ways to fix this... I'm not sure what's best. Perhaps detecting the absolute-ness early, and then passing that through, all the way to the end. There are a lot of places where things like this are used, so, perhaps it could be worth actually creating a "size delta" structure of some sort...