Fixed the 'Save as' not updating the current file's name (bug 289) and ignoring the selected format (!). When going to parent directory, the origin is now highlighted. When 'Saving as', the original file is highlighted. In DPaint skin, fixed the layer order arrows which were reversed, and made the default BG color 0, as it's more consistent with empty images which are filled with 0.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1275 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
8d2e0642e6
commit
357f8b37ef
13
buttons.c
13
buttons.c
@ -2994,13 +2994,18 @@ void Save_picture(byte image)
|
||||
|
||||
Save_image(&save_context);
|
||||
|
||||
if (!File_error && image && !Get_fileformat(save_context.Format)->Palette_only)
|
||||
{
|
||||
Main_image_is_modified=0;
|
||||
strcpy(Main_backups->Pages->Filename, save_context.File_name);
|
||||
strcpy(Main_backups->Pages->File_directory, save_context.File_directory);
|
||||
}
|
||||
|
||||
Hide_cursor();
|
||||
Cursor_shape=old_cursor_shape;
|
||||
Display_cursor();
|
||||
}
|
||||
Destroy_context(&save_context);
|
||||
//if (!image)
|
||||
// Swap_data_of_image_and_brush();
|
||||
|
||||
Print_filename();
|
||||
Set_palette(Main_palette);
|
||||
@ -3042,6 +3047,10 @@ void Button_Autosave(void)
|
||||
|
||||
Init_context_layered_image(&save_context, Main_backups->Pages->Filename, Main_backups->Pages->File_directory);
|
||||
Save_image(&save_context);
|
||||
if (!File_error)
|
||||
{
|
||||
Main_image_is_modified=0;
|
||||
}
|
||||
Destroy_context(&save_context);
|
||||
|
||||
Hide_cursor();
|
||||
|
||||
13
filesel.c
13
filesel.c
@ -1167,6 +1167,9 @@ byte Button_Load_or_Save(byte load, T_IO_Context *context)
|
||||
strcpy(Selector_filename,context->File_name);
|
||||
// On affiche le nouveau nom de fichier
|
||||
Print_filename_in_fileselector();
|
||||
|
||||
Highlight_file(context->File_name);
|
||||
Prepare_and_display_filelist(Main_fileselector_position,Main_fileselector_offset,file_scroller);
|
||||
}
|
||||
|
||||
New_preview_is_needed=1;
|
||||
@ -1616,12 +1619,12 @@ byte Button_Load_or_Save(byte load, T_IO_Context *context)
|
||||
|
||||
// On mémorise le répertoire dans lequel on était
|
||||
if (strcmp(Selector_filename,PARENT_DIR))
|
||||
strcpy(previous_directory,Format_filename(PARENT_DIR, 1));
|
||||
{
|
||||
strcpy(previous_directory,PARENT_DIR);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(previous_directory,
|
||||
Format_filename(Find_last_slash(Main_current_directory), 1)
|
||||
);
|
||||
Extract_filename(previous_directory, Main_current_directory);
|
||||
}
|
||||
|
||||
// On doit rentrer dans le répertoire:
|
||||
@ -1719,6 +1722,8 @@ byte Button_Load_or_Save(byte load, T_IO_Context *context)
|
||||
{
|
||||
strcpy(context->File_name, Selector_filename);
|
||||
strcpy(context->File_directory, Main_current_directory);
|
||||
if (!load)
|
||||
context->Format = Main_format;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -822,12 +822,10 @@ void Save_image(T_IO_Context *context)
|
||||
format->Save(context);
|
||||
|
||||
if (File_error)
|
||||
{
|
||||
Error(0);
|
||||
//else
|
||||
//{
|
||||
// if ((image) && !(Get_fileformat(Main_fileformat)->Palette_only))
|
||||
// Main_image_is_modified=0;
|
||||
//}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Loading…
x
Reference in New Issue
Block a user