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:
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/editors/include/ED_screen.h2
-rw-r--r--source/blender/editors/render/render_view.c3
-rw-r--r--source/blender/editors/screen/screen_edit.c4
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c21
5 files changed, 19 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a01b8b58c82..6f0400d5764 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1738,7 +1738,7 @@ static void direct_link_fmodifiers(FileData *fd, ListBase *list)
data->coefficients= newdataadr(fd, data->coefficients);
if(fd->flags & FD_FLAGS_SWITCH_ENDIAN) {
- unsigned a;
+ unsigned int a;
for(a = 0; a < data->arraysize; a++)
SWITCH_INT(data->coefficients[a]);
}
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 6e396a1021b..f2ef4e16852 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -107,7 +107,7 @@ void ED_screen_set_subwinactive(struct bContext *C, struct wmEvent *event);
void ED_screen_exit(struct bContext *C, struct wmWindow *window, struct bScreen *screen);
void ED_screen_animation_timer(struct bContext *C, int redraws, int refresh, int sync, int enable);
void ED_screen_animation_timer_update(struct bScreen *screen, int redraws, int refresh);
-int ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type);
+ScrArea *ED_screen_full_newspace(struct bContext *C, ScrArea *sa, int type);
void ED_screen_full_prevspace(struct bContext *C, ScrArea *sa);
void ED_screen_full_restore(struct bContext *C, ScrArea *sa);
struct ScrArea *ED_screen_full_toggle(struct bContext *C, struct wmWindow *win, struct ScrArea *sa);
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c
index 64a4d47cddc..9dfcde6ed0d 100644
--- a/source/blender/editors/render/render_view.c
+++ b/source/blender/editors/render/render_view.c
@@ -184,8 +184,7 @@ void render_view_open(bContext *C, int mx, int my)
area_was_image = 1;
/* this function returns with changed context */
- ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_IMAGE);
- sa= CTX_wm_area(C);
+ sa= ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_IMAGE);
}
if(!sa) {
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index eb41dcd147b..721ce823351 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -1513,7 +1513,7 @@ void ED_screen_delete_scene(bContext *C, Scene *scene)
unlink_scene(bmain, scene, newscene);
}
-int ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
+ScrArea *ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
{
wmWindow *win= CTX_wm_window(C);
bScreen *screen= CTX_wm_screen(C);
@@ -1538,7 +1538,7 @@ int ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
ED_area_newspace(C, newsa, type);
- return 1;
+ return newsa;
}
void ED_screen_full_prevspace(bContext *C, ScrArea *sa)
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 615259bda15..7bd5fd7e7df 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1289,16 +1289,23 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
if (handler->op_area == NULL) {
bScreen *screen = CTX_wm_screen(C);
sa = (ScrArea *)screen->areabase.first;
- } else
+ }
+ else {
sa = handler->op_area;
+ }
- if(event->val==EVT_FILESELECT_OPEN)
- ED_area_newspace(C, sa, SPACE_FILE);
- else
- ED_screen_full_newspace(C, sa, SPACE_FILE); /* sets context */
-
+ if(event->val==EVT_FILESELECT_OPEN) {
+ ED_area_newspace(C, sa, SPACE_FILE); /* 'sa' is modified in-place */
+ }
+ else {
+ sa= ED_screen_full_newspace(C, sa, SPACE_FILE); /* sets context */
+ }
+
+ /* note, getting the 'sa' back from the context causes a nasty bug where the newly created
+ * 'sa' != CTX_wm_area(C). removed the line below and set 'sa' in the 'if' above */
+ /* sa = CTX_wm_area(C); */
+
/* settings for filebrowser, sfile is not operator owner but sends events */
- sa = CTX_wm_area(C);
sfile= (SpaceFile*)sa->spacedata.first;
sfile->op= handler->op;