diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-27 04:03:49 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-27 04:03:49 +0400 |
commit | 1b1667018e3e960d21ec0c802290a5e49ffe2a90 (patch) | |
tree | cc64d18d4f6cad2b436f9ae0b00365b12923797b /source/blender/editors/interface/interface_handlers.c | |
parent | b89fb7d8fdea03549f0108554c5631b19f4be770 (diff) |
UI:
* Added Constraints template and Add Constraint operator.
* Added toggle=True/False parameter to uiItemR, to get a
toggle button (actual button) rather than an "option"
button (checkbox)
* Added OPTION/OPTIONN button type, to distinguish with
TOG/TOGN.
RNA:
* Make all modifier pointers editable, including correct updates.
* Added notifiers and updates to constraints.
* Fix a stack corruption, pointed out by Andrea, and potentially
causing crashes.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index ce01bc19856..ec2f960dd14 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -364,7 +364,7 @@ static void ui_apply_but_TOG(bContext *C, uiBlock *block, uiBut *but, uiHandleBu if(value==0.0) push= 1; else push= 0; - if(but->type==TOGN || but->type==ICONTOGN) push= !push; + if(ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) push= !push; ui_set_but_val(but, (double)push); if(but->type==ICONTOG || but->type==ICONTOGN) ui_check_but(but); } @@ -566,6 +566,8 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut case ICONTOGN: case TOGN: case BUT_TOGDUAL: + case OPTION: + case OPTIONN: ui_apply_but_TOG(C, block, but, data); break; case ROW: @@ -2672,6 +2674,8 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) case ICONTOGN: case TOGN: case BUT_TOGDUAL: + case OPTION: + case OPTIONN: retval= ui_do_but_TOG(C, but, data, event); break; #if 0 |