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:
authorCampbell Barton <ideasman42@gmail.com>2012-09-22 11:22:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-22 11:22:42 +0400
commitbb4537eb53f2b9332053cdd9182e5833857f2d60 (patch)
treecb1068cd5aec5f0b1d87c1f03c2189cd10ed3bad /source
parentb1ef5703d69b2c3ce158da46185967af4adc36fa (diff)
revert own commit r50501 (have a better way to implement this same feature)
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface_handlers.c9
-rw-r--r--source/blender/editors/interface/interface_intern.h12
-rw-r--r--source/blender/editors/interface/interface_regions.c1
3 files changed, 2 insertions, 20 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index d370dfe1abf..f1dcc0a300b 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -5279,12 +5279,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
/* automatic open pulldown block timer */
if (ELEM3(but->type, BLOCK, PULLDOWN, ICONTEXTROW)) {
- if ((data->used_mouse == TRUE) &&
- (data->autoopentimer == FALSE) &&
- /* don't popup the first time,
- * see description on this member for info */
- (but->block->auto_is_first_event == FALSE))
- {
+ if (data->used_mouse && !data->autoopentimer) {
int time;
if (but->block->auto_open == TRUE) { /* test for toolbox */
@@ -5304,8 +5299,6 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
data->autoopentimer = WM_event_add_timer(data->wm, data->window, TIMER, 0.02 * (double)time);
}
}
-
- but->block->auto_is_first_event = FALSE;
}
}
else {
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 57fc3d2abf9..b48c9bcab7e 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -305,17 +305,7 @@ struct uiBlock {
char direction;
char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied to buttons */
char auto_open;
-
- /* this setting is used so newly opened menu's dont popout the first item under the mouse,
- * the reasoning behind this is because of muscle memory for opening menus.
- *
- * Without this, the first time opening a Submenu and activating an item in it will be 2 steps,
- * but the second time the same item is accessed the menu memory would auto activate the
- * last used menu and the key intended to select that submenu ends up being passed into the submenu.
- * - Campbell
- */
- char auto_is_first_event;
- char _pad[6];
+ char _pad[7];
double auto_open_last;
const char *lockstr;
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 468a2e4128b..adf839d433b 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2491,7 +2491,6 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
pup->block = uiBeginBlock(C, NULL, __func__, UI_EMBOSSP);
pup->block->flag |= UI_BLOCK_POPUP_MEMORY;
pup->block->puphash = ui_popup_menu_hash(title);
- pup->block->auto_is_first_event = TRUE;
pup->layout = uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
uiLayoutSetOperatorContext(pup->layout, WM_OP_EXEC_REGION_WIN);