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>2003-07-05 14:50:42 +0400
committerTon Roosendaal <ton@blender.org>2003-07-05 14:50:42 +0400
commitc861979e7bcfde9ecd74953ac97aeebb16e5f380 (patch)
tree77e3c846d0c41dce11801fb45c3aae32929398a1 /source/blender/src/filesel.c
parent2a1c1fd067dec7ed4b657c41adf27d3c472bc482 (diff)
- fixed small bug in menu button (preset dirs) in fileselect. When the menu
is empty (no $HOME/.Bfs and first time use of FileSelect) it was empty, causing a nasty drawing error. It now doesn't draw the menubutton when there are no preset dirs yet. - removed 'unused variable' warnings from space.c
Diffstat (limited to 'source/blender/src/filesel.c')
-rw-r--r--source/blender/src/filesel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c
index 2e6ca4bf26b..6d9c4904691 100644
--- a/source/blender/src/filesel.c
+++ b/source/blender/src/filesel.c
@@ -1178,18 +1178,20 @@ void drawfilespace(ScrArea *sa, void *spacedata)
}
menu= fsmenu_build_menu();
- uiDefButS(block, MENU, 3, menu, scrollrct.xmin, filebuty1, scrollrct.xmax-scrollrct.xmin, 21, &sfile->menu, 0, 0, 0, 0, "");
+ if(menu[0]) // happens when no .Bfs is there, and first time browse
+ uiDefButS(block, MENU, 3, menu, scrollrct.xmin, filebuty1, scrollrct.xmax-scrollrct.xmin, 21, &sfile->menu, 0, 0, 0, 0, "");
MEM_freeN(menu);
uiDefBut(block, BUT, 4, "P", scrollrct.xmin, filebuty2, scrollrct.xmax-scrollrct.xmin, 21, 0, 0, 0, 0, 0, "Move to the parent directory (PKEY)");
+ uiDrawBlock(block);
+
draw_filescroll(sfile);
draw_filetext(sfile);
/* others diskfree etc ? */
scrarea_queue_headredraw(curarea);
- uiDrawBlock(block);
curarea->win_swap= WIN_BACK_OK;
}