Fix lack of history step in 'Copy to spare - palette and remap'
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1576 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
1cad25e4b5
commit
c581b3c5a6
@ -1721,35 +1721,53 @@ void Button_Copy_page(void)
|
|||||||
Close_window();
|
Close_window();
|
||||||
Display_cursor();
|
Display_cursor();
|
||||||
|
|
||||||
if (clicked_button!=6)
|
switch (clicked_button)
|
||||||
{
|
{
|
||||||
if (clicked_button==4)
|
case 1: // Pixels+palette
|
||||||
{
|
Backup_the_spare(-1);
|
||||||
// Will backup if needed
|
Copy_image_only();
|
||||||
Copy_some_colors();
|
// copie de la palette
|
||||||
}
|
memcpy(Spare_palette,Main_palette,sizeof(T_Palette));
|
||||||
else
|
// Equivalent of 'end_of_modifications' for spare.
|
||||||
{
|
|
||||||
if (clicked_button<=2)
|
|
||||||
{
|
|
||||||
Backup_the_spare(-1);
|
|
||||||
Copy_image_only();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Backup_the_spare(0);
|
|
||||||
|
|
||||||
if (clicked_button==5)
|
|
||||||
Remap_spare();
|
|
||||||
|
|
||||||
if (clicked_button!=2) // copie de la palette
|
|
||||||
memcpy(Spare_palette,Main_palette,sizeof(T_Palette));
|
|
||||||
|
|
||||||
// Here is the 'end_of_modifications' for spare.
|
|
||||||
Update_spare_buffers(Spare_image_width,Spare_image_height);
|
Update_spare_buffers(Spare_image_width,Spare_image_height);
|
||||||
Redraw_spare_image();
|
Redraw_spare_image();
|
||||||
|
|
||||||
Spare_image_is_modified=1;
|
Spare_image_is_modified=1;
|
||||||
}
|
break;
|
||||||
|
|
||||||
|
case 2: // Pixels only
|
||||||
|
Backup_the_spare(-1);
|
||||||
|
Copy_image_only();
|
||||||
|
// Equivalent of 'end_of_modifications' for spare.
|
||||||
|
Update_spare_buffers(Spare_image_width,Spare_image_height);
|
||||||
|
Redraw_spare_image();
|
||||||
|
Spare_image_is_modified=1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: // Palette only
|
||||||
|
Backup_the_spare(0);
|
||||||
|
// Copy palette
|
||||||
|
memcpy(Spare_palette,Main_palette,sizeof(T_Palette));
|
||||||
|
// Equivalent of 'end_of_modifications' for spare.
|
||||||
|
Update_spare_buffers(Spare_image_width,Spare_image_height);
|
||||||
|
Redraw_spare_image();
|
||||||
|
Spare_image_is_modified=1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 4: // Some colors
|
||||||
|
// Will backup if needed
|
||||||
|
Copy_some_colors();
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 5: // Palette and remap
|
||||||
|
Backup_the_spare(-1);
|
||||||
|
Remap_spare();
|
||||||
|
// Copy palette
|
||||||
|
memcpy(Spare_palette,Main_palette,sizeof(T_Palette));
|
||||||
|
// Equivalent of 'end_of_modifications' for spare.
|
||||||
|
Update_spare_buffers(Spare_image_width,Spare_image_height);
|
||||||
|
Redraw_spare_image();
|
||||||
|
Spare_image_is_modified=1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Hide_cursor();
|
Hide_cursor();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user