Fix issue 508: corrupted graphics when switching between layers and anim modes
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2001 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
2e16f0bec3
commit
440f04ad4f
@ -502,6 +502,15 @@ void Button_Toggle_toolbar(void)
|
||||
// Exceptionally, this doesn't require a backup because a single-layer
|
||||
// image is the same as a single-frame animation.
|
||||
Main_backups->Pages->Image_mode = IMAGE_MODE_LAYERED;
|
||||
Update_buffers(Main_image_width, Main_image_height);
|
||||
// Refresh the buffer, special shortcut because only one layer exists.
|
||||
memset(Main_visible_image_depth_buffer.Image, 0, Main_image_width*Main_image_height);
|
||||
memcpy(Main_visible_image.Image,
|
||||
Main_backups->Pages->Image[0].Pixels,
|
||||
Main_image_width*Main_image_height);
|
||||
|
||||
Update_pixel_renderer();
|
||||
|
||||
}
|
||||
break;
|
||||
case 2: // anim
|
||||
@ -514,6 +523,7 @@ void Button_Toggle_toolbar(void)
|
||||
// Exceptionally, this doesn't require a backup because a single-frame
|
||||
// animation is the same as a single-layer image.
|
||||
Main_backups->Pages->Image_mode = IMAGE_MODE_ANIMATION;
|
||||
Update_pixel_renderer();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user