kicad-developers team mailing list archive
Mailing list archive
Dialog field validation on KillFocus
While most UI guidelines suggest validating on field exit, it’s not without cost. In particular, on GTK we can’t tell the difference between a KillFocus from clicking the OK button (when validation should be run) and a KillFocus from clicking Cancel (when it should not).
Needless to say, KillFocus-validation also plays very poorly when GTK’s focus-follows-mouse is turned on.
So I plan to do two things:
1) Remove automatic validation on KillFocus from UNIT_BINDER. Clients which need validation will be modified to call Validate() themselves from their TransferDataFromWindow() methods.
2) Remove UNIT_BINDER validation which isn’t needed. We have a lot of validation which just checks for “reasonable” values. However, our definition of “reasonable” doesn’t always match our users’ definitions. “Needed” validation (which will remain) is that which prevents un-supported situations, or that which makes recovery hard (for instance, PCB text with a zero width is hard to select).
Any comments before I go ahead?