diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-09-19 03:25:59 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-09-19 03:41:10 +0300 |
commit | c2d7d4764e86d8a133168ff8ea9aedbd78b5cd72 (patch) | |
tree | 421fef350fcdcbb8f0bc25f26390951cc9ee2121 /source/blender/editors/interface/interface.c | |
parent | 976e591e93dd97de2c8f5be639a78c22e6505bae (diff) |
Various cleanups related to button locking
* Rename uiBut.lockstr to disabled_info
* Remove unreachable code
* Replace duplicated check with assert
* Replace overly ambitious check with assert
* Add comments
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 6d4c8f0ab98..aca107013ac 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -3121,7 +3121,7 @@ static uiBut *ui_def_but( but->a2 = a2; but->tip = tip; - but->lockstr = block->lockstr; + but->disabled_info = block->lockstr; but->dt = block->dt; but->pie_dir = UI_RADIAL_NONE; @@ -3218,7 +3218,7 @@ void ui_def_but_icon(uiBut *but, const int icon, const int flag) static void ui_def_but_rna__disable(uiBut *but) { but->flag |= UI_BUT_DISABLED; - but->lockstr = ""; + but->disabled_info = ""; } static void ui_def_but_rna__menu(bContext *UNUSED(C), uiLayout *layout, void *but_p) @@ -3543,7 +3543,7 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, int type, wmOperatorType * if (!ot) { but->flag |= UI_BUT_DISABLED; - but->lockstr = ""; + but->disabled_info = ""; } return but; |