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:
authorCampbell Barton <ideasman42@gmail.com>2008-05-07 03:58:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-05-07 03:58:15 +0400
commit7d2e366e8ff0e58a469974d31d78b9d71ae30b52 (patch)
tree2d916719e0a59a86074fa975acc4c517ec77a852 /source/blender/src/interface.c
parent881802d8a385228a3b8af3b1b7ccb8512c96490b (diff)
fix for [#10180] File Browser buttons disappear after clicking on Window Type button
Spent some time looking into what this could break and it seems like a safe change.
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r--source/blender/src/interface.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index fb5b5e2f187..f324bf3b053 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -2328,6 +2328,7 @@ static int ui_do_but_ICONROW(uiBut *but)
ListBase listb= {NULL, NULL};
uiBlock *block;
int a;
+ short event;
but->flag |= UI_SELECT;
ui_draw_but(but);
@@ -2348,13 +2349,17 @@ static int ui_do_but_ICONROW(uiBut *but)
this is needs better implementation */
block->win= G.curscreen->mainwin;
- uiDoBlocks(&listb, 0, 1);
+ event= uiDoBlocks(&listb, 0, 1);
but->flag &= ~UI_SELECT;
ui_check_but(but);
ui_draw_but(but);
-
- return but->retval;
+
+ if (event & UI_RETURN_OK) {
+ return but->retval;
+ } else {
+ return 0;
+ }
}
static int ui_do_but_ICONTEXTROW(uiBut *but)
@@ -2363,7 +2368,7 @@ static int ui_do_but_ICONTEXTROW(uiBut *but)
ListBase listb={NULL, NULL};
int width, a, xmax, ypos;
MenuData *md;
-
+ short event;
but->flag |= UI_SELECT;
ui_draw_but(but);
ui_block_flush_back(but->block); // flush because this button creates own blocks loop
@@ -2421,7 +2426,7 @@ static int ui_do_but_ICONTEXTROW(uiBut *but)
uiBoundsBlock(block, 3);
- uiDoBlocks(&listb, 0, 1);
+ event = uiDoBlocks(&listb, 0, 1);
menudata_free(md);
@@ -2429,10 +2434,12 @@ static int ui_do_but_ICONTEXTROW(uiBut *but)
ui_check_but(but);
ui_draw_but(but);
- uibut_do_func(but);
-
- return but->retval;
-
+ if (event & UI_RETURN_OK) {
+ uibut_do_func(but);
+ return but->retval;
+ } else {
+ return 0;
+ }
}
static int ui_do_but_IDPOIN(uiBut *but)