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>2004-11-10 02:05:06 +0300
committerTon Roosendaal <ton@blender.org>2004-11-10 02:05:06 +0300
commita534361b3e41886265fbad6d649f56d8ded021ec (patch)
treeb25a6cbea5f694847398de3a735d6c14159bb9a0 /source/blender/src/interface.c
parent422127e1ca20d74b6550982e0a9f764f902eca42 (diff)
More small changes;
- Added "Add Hook" menu in mesh editmode pulldown (Vertices) and toolbox - Small tweak in editmode undo, tighten rules for what to do inbetween editmode sessions. (use same stack when object names identical) - Added correct redraw events for CTRL+C CTRL+V (r g b sliders for example)
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r--source/blender/src/interface.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index 8a0f1ea235b..aed87eec60d 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -420,7 +420,8 @@ void ui_block_set_flush(uiBlock *block, uiBut *but)
/* ******************* copy and paste ******************** */
/* c = copy, v = paste */
-static void ui_but_copy_paste(uiBut *but, char mode)
+/* return 1 when something changed */
+static int ui_but_copy_paste(uiBut *but, char mode)
{
static char str[256]="";
static double butval=0.0;
@@ -433,6 +434,7 @@ static void ui_but_copy_paste(uiBut *but, char mode)
else {
ui_set_but_val(but, butval);
ui_check_but(but);
+ return 1;
}
}
else if(but->type==TEX) {
@@ -444,6 +446,7 @@ static void ui_but_copy_paste(uiBut *but, char mode)
strncpy(but->poin, str, but->max);
uibut_do_func(but);
ui_check_but(but);
+ return 1;
}
}
else if(but->type==IDPOIN) {
@@ -455,9 +458,10 @@ static void ui_but_copy_paste(uiBut *but, char mode)
else {
but->idpoin_func(str, but->idpoin_idpp);
ui_check_but(but);
+ return 1;
}
}
-
+ return 0;
}
/* ******************* block calc ************************* */
@@ -1243,6 +1247,7 @@ static int ui_do_but_KEYEVT(uiBut *but)
ui_set_but_val(but, -1);
ui_check_but(but);
ui_draw_but(but);
+ ui_block_flush_back(but->block);
do {
event= extern_qread(&val);
@@ -3226,17 +3231,22 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent)
for(but= block->buttons.first; but; but= but->next) {
if(but->type!=LABEL) {
if(but->flag & UI_ACTIVE) {
- if(uevent->event==VKEY) ui_but_copy_paste(but, 'v');
- else ui_but_copy_paste(but, 'c');
-
- ui_draw_but(but);
+ int doit=0;
- if(but->retval) addqueue(block->winq, UI_BUT_EVENT, (short)but->retval);
- BIF_undo_push(but->str);
+ if(uevent->event==VKEY) doit= ui_but_copy_paste(but, 'v');
+ else ui_but_copy_paste(but, 'c');
+ if(doit) {
+ ui_draw_but(but);
+
+ if(but->retval) addqueue(block->winq, UI_BUT_EVENT, (short)but->retval);
+ if(but->type==NUMSLI && but->a1) addqueue(block->winq, REDRAW, 1); // col button update
+
+ BIF_undo_push(but->str);
+ }
+ // but we do return, to prevent passing event through other queues */
if( (block->flag & UI_BLOCK_LOOP) && but->type==BLOCK);
else if(but->retval) retval= UI_RETURN_OK;
-
break;
}
}