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>2015-06-09 14:54:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-06-09 14:55:35 +0300
commitaf980a20a46c9c865418cf60ddaf669e37587bfb (patch)
treec4d470ed5b054f24b4f487ec0122eb29c84fb4d1 /source/blender/windowmanager/intern
parent6c8f2049f69e38edbc6993258f204cd7180355ba (diff)
Fix T37746: Presets in splash failed to redraw
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 041ef6f8282..cd97293516d 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1853,17 +1853,10 @@ static void wm_block_splash_close(bContext *C, void *arg_block, void *UNUSED(arg
static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unused);
-/* XXX: hack to refresh splash screen with updated preset menu name,
- * since popup blocks don't get regenerated like panels do */
-static void wm_block_splash_refreshmenu(bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg))
+static void wm_block_splash_refreshmenu(bContext *C, void *UNUSED(arg_block), void *UNUSED(arg))
{
- /* ugh, causes crashes in other buttons, disabling for now until
- * a better fix */
-#if 0
- wmWindow *win = CTX_wm_window(C);
- UI_popup_block_close(C, win, arg_block);
- UI_popup_block_invoke(C, wm_block_create_splash, NULL);
-#endif
+ ARegion *ar_menu = CTX_wm_menu(C);
+ ED_region_tag_refresh_ui(ar_menu);
}
static int wm_resource_check_prev(void)
@@ -1945,7 +1938,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
/* note on UI_BLOCK_NO_WIN_CLIP, the window size is not always synchronized
* with the OS when the splash shows, window clipping in this case gives
* ugly results and clipping the splash isn't useful anyway, just disable it [#32938] */
- UI_block_flag_enable(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP);
+ UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP);
/* XXX splash scales with pixelsize, should become widget-units */
but = uiDefBut(block, UI_BTYPE_IMAGE, 0, "", 0, 0.5f * U.widget_unit, U.pixelsize * 501, U.pixelsize * 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */