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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-01-17 00:16:09 +0300
committerTon Roosendaal <ton@blender.org>2004-01-17 00:16:09 +0300
commit24c43b835d48de0c02ced5160d0d0831bc5cb55e (patch)
tree5e2eb79d05918555cbdde688ff73f4d3a53d33ea /source
parentd5a1b582c3fc83eba91bf1ef9f594b9d37966a6d (diff)
- pressing Enter key on numbutton increases/decreases again.
- added displist.h for proper prototype in previous commit
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/editsima.c1
-rw-r--r--source/blender/src/interface.c89
2 files changed, 45 insertions, 45 deletions
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c
index cb796b0a995..8b03c434424 100644
--- a/source/blender/src/editsima.c
+++ b/source/blender/src/editsima.c
@@ -60,6 +60,7 @@
#include "BKE_global.h"
#include "BKE_mesh.h"
+#include "BKE_displist.h"
#include "BIF_gl.h"
#include "BIF_interface.h"
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index 20e85f972dd..a23d3f7c617 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -2661,63 +2661,62 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent)
break;
default:
- if (uevent->event!=RETKEY) { /* when previous command was arrow */
- but= block->buttons.first;
- while(but) {
+
+ but= block->buttons.first;
+ while(but) {
+
+ but->flag &= ~UI_MOUSE_OVER;
- but->flag &= ~UI_MOUSE_OVER;
-
- /* check boundbox */
- if (uibut_contains_pt(but, uevent->mval)) {
- but->flag |= UI_MOUSE_OVER;
- UIbuttip= but;
+ /* check boundbox */
+ if (uibut_contains_pt(but, uevent->mval)) {
+ but->flag |= UI_MOUSE_OVER;
+ UIbuttip= but;
+ }
+ /* hilite case 1 */
+ if(but->flag & UI_MOUSE_OVER) {
+ if( (but->flag & UI_ACTIVE)==0) {
+ but->flag |= UI_ACTIVE;
+ if(but->type != LABEL && (but->flag & UI_NO_HILITE)==0) ui_draw_but(but);
}
- /* hilite case 1 */
- if(but->flag & UI_MOUSE_OVER) {
- if( (but->flag & UI_ACTIVE)==0) {
- but->flag |= UI_ACTIVE;
+ }
+ /* hilite case 2 */
+ if(but->flag & UI_ACTIVE) {
+ if( (but->flag & UI_MOUSE_OVER)==0) {
+ /* we dont clear active flag until mouse move, for Menu buttons to remain showing active item when opened */
+ if (uevent->event==MOUSEY) {
+ but->flag &= ~UI_ACTIVE;
if(but->type != LABEL && (but->flag & UI_NO_HILITE)==0) ui_draw_but(but);
}
}
- /* hilite case 2 */
- if(but->flag & UI_ACTIVE) {
- if( (but->flag & UI_MOUSE_OVER)==0) {
- /* we dont clear active flag until mouse move, for Menu buttons to remain showing active item when opened */
- if (uevent->event==MOUSEY) {
- but->flag &= ~UI_ACTIVE;
- if(but->type != LABEL && (but->flag & UI_NO_HILITE)==0) ui_draw_but(but);
+ else if(but->type==BLOCK || but->type==MENU) { // automatic opens block button (pulldown)
+ int time;
+ if(uevent->event!=LEFTMOUSE ) {
+ if(block->auto_open==2) time= 1; // test for toolbox
+ else if(block->auto_open) time= 5*U.menuthreshold2;
+ else if(U.uiflag & USER_MENUOPENAUTO) time= 5*U.menuthreshold1;
+ else time= -1;
+
+ for (; time>0; time--) {
+ if (qtest()) break;
+ else PIL_sleep_ms(20);
}
- }
- else if(but->type==BLOCK || but->type==MENU) { // automatic opens block button (pulldown)
- int time;
- if(uevent->event!=LEFTMOUSE ) {
- if(block->auto_open==2) time= 1; // test for toolbox
- else if(block->auto_open) time= 5*U.menuthreshold2;
- else if(U.uiflag & USER_MENUOPENAUTO) time= 5*U.menuthreshold1;
- else time= -1;
-
- for (; time>0; time--) {
- if (qtest()) break;
- else PIL_sleep_ms(20);
- }
-
- if(time==0) {
- uevent->val= 1; // otherwise buttons dont react
- ui_do_button(block, but, uevent);
- }
+
+ if(time==0) {
+ uevent->val= 1; // otherwise buttons dont react
+ ui_do_button(block, but, uevent);
}
}
- if(but->flag & UI_ACTIVE) active= 1;
}
-
- but= but->next;
+ if(but->flag & UI_ACTIVE) active= 1;
}
- /* if there are no active buttons... otherwise clear lines */
- if(active) ui_do_active_linklines(block, 0);
- else ui_do_active_linklines(block, uevent->mval);
-
+ but= but->next;
}
+
+ /* if there are no active buttons... otherwise clear lines */
+ if(active) ui_do_active_linklines(block, 0);
+ else ui_do_active_linklines(block, uevent->mval);
+
}
/* middlemouse exception, not for regular blocks */