svn merge ^/trunk/blender -r49601:49620
[blender.git] / source / blender / editors / space_image / space_image.c
index cc8940201e2faf68f78c77a2d1294a7335ceae9e..86048a704668a4f917baecf90dd7e6851df78405 100644 (file)
@@ -151,6 +151,8 @@ static SpaceLink *image_new(const bContext *UNUSED(C))
        simage->zoom = 1.0f;
        simage->lock = TRUE;
 
+       BKE_color_managed_view_settings_init(&simage->view_settings);
+
        simage->iuser.ok = TRUE;
        simage->iuser.fie_ima = 2;
        simage->iuser.frames = 100;
@@ -213,6 +215,7 @@ static void image_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
 
 static SpaceLink *image_duplicate(SpaceLink *sl)
 {
+       SpaceImage *simage = (SpaceImage *) sl;
        SpaceImage *simagen = MEM_dupallocN(sl);
        
        /* clear or remove stuff from old */
@@ -221,6 +224,8 @@ static SpaceLink *image_duplicate(SpaceLink *sl)
 
        scopes_new(&simagen->scopes);
 
+       BKE_color_managed_view_settings_copy(&simagen->view_settings, &simage->view_settings);
+
        return (SpaceLink *)simagen;
 }
 
@@ -647,7 +652,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar)
        image_main_area_set_view2d(sima, ar);
 
        /* we draw image in pixelspace */
-       draw_image_main(sima, ar, scene);
+       draw_image_main(C, ar);
 
        /* and uvs in 0.0-1.0 space */
        UI_view2d_view_ortho(v2d);