Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-11-21 23:25:31 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-11-21 23:25:31 +0400
commit811ce5a696ae4b7043744a081980c3e77e4bd927 (patch)
tree5ce5e9c8ee42454b64fe1a1c29fe6e0d36f1a88f /source/blender/editors
parent24795943511c85d4a8aeea6aba05c5b648df8e04 (diff)
Code cleanup: Minor addition to rB254aa8f3a0fbffcbcb886cfaa81b630ae3e9bb78: handle copying of drawflag in ui_but_update_from_old_block()
Note that this is not really needed currently, as the only flag being copied here (UI_BUT_REDALERT) remained in but->flag. However, since we'll have more flags in drawflag now, it's better to explicitly handle this situation... This func could use some cleanup anyway (a bunch of commented code here)... Thanks to Campbell for noting this!
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 800fee648e7..3f48446f029 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -613,6 +613,7 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
{
/* flags from the buttons we want to refresh, may want to add more here... */
const int flag_copy = UI_BUT_REDALERT;
+ const int drawflag_copy = 0; /* None currently. */
uiBlock *oldblock;
uiBut *oldbut, *but = *butpp;
@@ -670,8 +671,9 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
SWAP(char *, oldbut->poin, but->poin);
SWAP(void *, oldbut->func_argN, but->func_argN);
}
-
+
oldbut->flag = (oldbut->flag & ~flag_copy) | (but->flag & flag_copy);
+ oldbut->drawflag = (oldbut->drawflag & ~drawflag_copy) | (but->drawflag & drawflag_copy);
/* copy hardmin for list rows to prevent 'sticking' highlight to mouse position
* when scrolling without moving mouse (see [#28432]) */