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:
authorTon Roosendaal <ton@blender.org>2007-01-08 17:55:53 +0300
committerTon Roosendaal <ton@blender.org>2007-01-08 17:55:53 +0300
commit97eb805f9c9245c864f93fbcb7e8166d147f956d (patch)
treea638bac85e54afa02bb8e1bd2b7d8803a8ff9141 /source/blender/src/interface.c
parentc53c35f5820baaaf3b62b2f71a3268d5663fe140 (diff)
Bugfix #5551
CTRL+C/V (or Apple+C/V) on buttons didn't copy/paste names for buttons of type "ID pointer" anymore. Was caused by NULL pointer check in wrong location.
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r--source/blender/src/interface.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index cede5764093..6e9dcf7b9a0 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -470,13 +470,12 @@ static int ui_but_copy_paste(uiBut *but, char mode)
void *poin;
if(mode=='v' && but->lock) return 0;
- if(but->poin==NULL) return 0;
-
poin= but->poin;
if ELEM3(but->type, NUM, NUMSLI, HSVSLI) {
-
- if(mode=='c') {
+
+ if(poin==NULL);
+ else if(mode=='c') {
but_copypaste_val= ui_get_but_val(but);
}
else {
@@ -487,7 +486,8 @@ static int ui_but_copy_paste(uiBut *but, char mode)
}
else if(but->type==COL) {
- if(mode=='c') {
+ if(poin==NULL);
+ else if(mode=='c') {
if(but->pointype==FLO) {
float *fp= (float *) poin;
but_copypaste_rgb[0]= fp[0];
@@ -523,7 +523,8 @@ static int ui_but_copy_paste(uiBut *but, char mode)
}
else if(but->type==TEX) {
- if(mode=='c') {
+ if(poin==NULL);
+ else if(mode=='c') {
strncpy(but_copypaste_str, but->poin, but->max);
}
else {